HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Trace a segmentation fault back to an unloaded...
Operating System - HP-UX
1825770
Members
1989
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2010 07:11 AM
07-12-2010 07:11 AM
I have read this question: http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1278944680878+28353475&threadId=1339960
and did the same test using g++ 4.3.3. The test program causes a coredump as I expected.
In this situation I know exactly the library what causes a coredump because I have intentionally put a static variable in its function.
However in general I don't know steps that I shall do in order to find out what library caused a coredump using only backtrace, disassemble, info registers and info shared (as if this happened in a real world situation and I only knew backtrace and registers).
So how could I trace this segmentation fault back to the unloaded library using backtrace, disassemble and info registers?
I have put everyting related to my question in the attached file.
Any help is appreciated.
I do understand that aCC doen't have this sort of problem. So the question is not about aCC.
and did the same test using g++ 4.3.3. The test program causes a coredump as I expected.
In this situation I know exactly the library what causes a coredump because I have intentionally put a static variable in its function.
However in general I don't know steps that I shall do in order to find out what library caused a coredump using only backtrace, disassemble, info registers and info shared (as if this happened in a real world situation and I only knew backtrace and registers).
So how could I trace this segmentation fault back to the unloaded library using backtrace, disassemble and info registers?
I have put everyting related to my question in the attached file.
Any help is appreciated.
I do understand that aCC doen't have this sort of problem. So the question is not about aCC.
Solved! Go to Solution.
- Tags:
- SIGSEGV
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2010 10:27 PM
07-12-2010 10:27 PM
Solution
The problem could happen with cc or aC++ but you have to work harder. :-)
>I don't know steps that I shall do in order to find out what library caused a coredump using only backtrace, disassemble, info registers and info shared.
You can't. All you can find out is that you are referencing an address that isn't covered by the current text and data regions from "info shared".
If you run this in gdb, gdb nicely remembers shlibs that were unloaded. And you can do "catch unload" to see which shlib has that address.
Or after it aborts, you run it again and match up with the "info shared" values, before it is unloaded.
>I don't know steps that I shall do in order to find out what library caused a coredump using only backtrace, disassemble, info registers and info shared.
You can't. All you can find out is that you are referencing an address that isn't covered by the current text and data regions from "info shared".
If you run this in gdb, gdb nicely remembers shlibs that were unloaded. And you can do "catch unload" to see which shlib has that address.
Or after it aborts, you run it again and match up with the "info shared" values, before it is unloaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2010 06:57 AM
07-13-2010 06:57 AM
Re: Trace a segmentation fault back to an unloaded library
the program coredumped on the instruction:
ld8 ret1=[ret1]
I examine the ret1 register:
info reg ret1
gr9: 0x9fffffffff30d000
and the address 0x9fffffffff30d000 according to "info shared" belongs to the unloaded library libmy_lib.so.1. So accessing this address results in a coredump.
ld8 ret1=[ret1]
I examine the ret1 register:
info reg ret1
gr9: 0x9fffffffff30d000
and the address 0x9fffffffff30d000 according to "info shared" belongs to the unloaded library libmy_lib.so.1. So accessing this address results in a coredump.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP