- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem with thread, socket and HP-UX 11.00
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
07-15-2003 09:25 AM
07-15-2003 09:25 AM
on a L1000 with HP-UX 11.00, some application running on threads (pthreads) using socket (TCP) and accept() is not working.
The behaviour is the following:
- the remote client connects and connect() is successfull;
- netstat says the connection is ESTABLISHED
- the application accept() returns -1 and errno is usually 9 (but sometimes is 0);
- the client stays connected but the thread on the server that made the accept() can't continue;
- with applications not based on threads, accept() works correctly (this should exclude resource problems like maxfiles...);
- if I compile a test program (server.c attached) and run the routine making the accept() in the main part, it works but if it runs in a new thread, the problem arises.
Furthermore:
- The problems arises with different applications;
- I suspect the problem is related to PHKL_20202 (Fix pthread error return, nfs/tcp panic) but it is not supersed nor have any kind of warnings
Please find attached:
- kernel parameters
- swlist -l product
- server and client test programs
(Compiled:
client: cc client.c -o client
server multi-thread: cc server.c -lpthread -D_PTHREAD -o server.mt
server mono-thread: cc server.c -o server.st
)
Can anyone help?
Thanks,
Sergio
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2003 06:01 PM
07-15-2003 06:01 PM
Re: Problem with thread, socket and HP-UX 11.00
Also, IIRC, to compile threaded on UX, one definces -D_REENTRANT, I do not recall a -D_PTHREAD define being used. I'm guessing that is one you are using in your source, but I don't think the header files will look for that...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2003 02:43 AM
07-16-2003 02:43 AM
Re: Problem with thread, socket and HP-UX 11.00
I'll use tusc and let you know
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2003 03:46 AM
07-16-2003 03:46 AM
Re: Problem with thread, socket and HP-UX 11.00
Just FYI, I compiled your programs on 11i and both the single and multi threaded versions worked fine. Unfortunately I don't have access to any 11.00 boxes here so I couldn't test further. Your patches look up to date.
As mentioned, I used the same compile options as yourself but from the pthread man page :
"A multi-threaded application must define the appropriate POSIX
revision level (199506) at compile time and link against the pthread
library via -lpthread. For example:
cc -D_POSIX_C_SOURCE=199506L -o myapp myapp.c -lpthread"
Not sure if this is relevant. Tusc is certainly the tool to use here. Useful options would be :
-p : show pids
-v : verbose
-f : follow forks
-u : print lwpids
-l : print user pthread ids
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 12:31 AM
07-17-2003 12:31 AM
Re: Problem with thread, socket and HP-UX 11.00
Your help is much appreciated.
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 06:03 AM
07-17-2003 06:03 AM
Re: Problem with thread, socket and HP-UX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 06:03 AM
07-17-2003 06:03 AM
Re: Problem with thread, socket and HP-UX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 06:13 AM
07-17-2003 06:13 AM
Re: Problem with thread, socket and HP-UX 11.00
i see, from tusc, that there are more errors coming first:
open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0) ERR#2 ENOENT
mmap(NULL, 1232896, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x47000) ERR#12 ENOMEM
accept(3, 0x779bb0c8, 0x779bb0bc) ............. ERR#9 EBADF
It may worth to resolve the first... maybe the last is only a consequence.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 07:38 AM
07-17-2003 07:38 AM
Re: Problem with thread, socket and HP-UX 11.00
we tried tusc on another box were everything works fine and we get the same first error messages.
So I think they should be considered irrelevant as far as the last one is concerned...
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2003 08:22 AM
07-17-2003 08:22 AM
Re: Problem with thread, socket and HP-UX 11.00
I can confirm those two other messages are not applicable here.
This looks strange....I just ran it on an 11.00 workstation and the multi-threaded worked fine. The single threaded one actually had problems??
In any case it looks like a software issue. I think you need to review your patching, I suspect a missing dependency to the ARPA code you have. You can use swverify or even better use /usr/contrib/bin/check_patches if you have it. Or you could manually check the main suspects, ARPA and possibly Streams too. Let me know if you have any questions regarding this procedure.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2003 04:34 AM
07-18-2003 04:34 AM
Re: Problem with thread, socket and HP-UX 11.00
please find attached the swverify.log file.
Can you find anything strange?
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2003 04:36 AM
07-18-2003 04:36 AM
Re: Problem with thread, socket and HP-UX 11.00
i don't that is relevatn, but there is a warning about a product for another OS.
I think it is this:
PPM_030102.PPMFILES,l=/,r=3.1.2,a=S700/S800_HPUX_10.20,v=Marconi
Do you know what is it ?
Good luck !
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2003 04:41 AM
07-18-2003 04:41 AM
Re: Problem with thread, socket and HP-UX 11.00
I should have told you before...
For sure it is irrelevant
Ciao Max!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2003 04:48 AM
07-18-2003 04:48 AM
Re: Problem with thread, socket and HP-UX 11.00
Its actually the swagent.log we need to have a look at. Looks like its gonna be big though....it may be worth starting with the swverify of your arpa patch first but feel free to post the full thing.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2003 02:52 AM
07-21-2003 02:52 AM
Re: Problem with thread, socket and HP-UX 11.00
please find attached swagent.log.
Best regards,
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2003 04:33 AM
07-21-2003 04:33 AM
SolutionI couldn't see too much wrong in the swagent.log, but when I re-visited your patch list I did notice something I really should of at the start. You present ARPA patch is PHNE_24715 which is very close to the dreaded PHNE_23456. It has two critical patch warnings against it, basically saying that the server side of a tcp/ip connection can lose data from the client in certain circumstances. See the patch text on the ITRC for a full description.
I would advise you install the latest, recommended ARPA patch, PHNE_28538. This will also update your Streams code etc.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 01:03 AM
07-22-2003 01:03 AM
Re: Problem with thread, socket and HP-UX 11.00
I'll leave your post "unassigned" until I'll install the patch.
This because most probably this is the "magical answer"...
Regards,
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2003 11:55 PM
07-24-2003 11:55 PM
Re: Problem with thread, socket and HP-UX 11.00
it was the answer that solved the problem.
By installing that patch and all dependencies we eventually solved the problem.
Thanks a lot,
Sergio