- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Interrupted system calls mitigated with tusc?
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
09-01-2003 07:14 AM
09-01-2003 07:14 AM
I am trying to make an application (for HPUX 11i, or 11.11), where a third party executable 'A' dynamically loads a shared object (that I wrote) 'B', which in turn loads (with dlopen()) another third party's shared object 'C', and calls functions from it.
Now 'C' returns an error to me when call one of its functions (specifically, one that connects a socket to another machine).
When I write a small application that emulates what 'A' is supposed to be doing, it works, so 'A' is somehow fouling something up.
After some digging, I found out that somewhere in the call to 'C', an interrupted system call takes place (I am suspecting either in getsockname() or brk()).
Now my problem is that when I use 'tusc' to trace the system calls, everything works as it should, so somehow tusc seems to be mitigating the interrupted system call. Can anyone explain how this works?
Are there any open issues with the two functions I mentioned? Since 'C' is using libpthread, is there perhaps some other issue with pthreads that makes either function behave strangely?
Thanks in advance,
Frank
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2003 07:28 AM
09-01-2003 07:28 AM
Re: Interrupted system calls mitigated with tusc?
All tusc should be doing is monitoring the process you hung it on. It should not be interfering with the operation of the application.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2003 07:31 AM
09-01-2003 07:31 AM
Re: Interrupted system calls mitigated with tusc?
first of all i'm totally ignorant in programming, but i followed some thread with similar problems.
Check the permission of the library, and be sure that they are r-xr-xr-x (no write).
Tusc maybe mitigating the error because it lead the program to run in a slightly different contest, like a debugger, and some shared library check are mitigated.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2003 08:27 AM
09-01-2003 08:27 AM
SolutionThe way a process responds to signals is different when it is being traced. When a signal is generated for the traced process, the kernel will suspend the process and will notify the parent via a sigchld signal, hence not invoking the default signal handler of the traced process. Hence in your case this is allowing the parent to intercept the signal and deal with it "correctly" in your case. Basically you need to look at the tusc output or code and see how the parents signal handlers are setup and code this for the child to avoid the interrupted syscall.
Cheers,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2003 04:37 AM
09-02-2003 04:37 AM
Re: Interrupted system calls mitigated with tusc?
Using tusc's -p and -l parameters, I found out that in the fragment in 'C' that was returning the error, the application 'A' is actually using a second LWP thread that sends the main thread a signal (SIGUSR2) using _lwp_kill. I am guessing this is some kind of keep-alive thread? I have written the coders of 'A' about it.
This explains why everything works when I use my emulating program (which does not have that second thread).
Regarding tusc, I think James' suggestion came closest to what I am experiencing - tusc is handling the signals differently than the application 'A' (since it effectively is the parent).
I've tried Massimo's suggestion, but it didn't help me.
For now, I'm going to wait a while for the coders of 'A' to respond, but thanks for the replies, folks!