home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4539 < prev    next >
Encoding:
Internet Message Format  |  1992-09-04  |  2.0 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!elroy.jpl.nasa.gov!ames!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!ecn.purdue.edu!kudva
  2. From: kudva@ecn.purdue.edu (Gautham K. Kudva)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Sun LWP bug? Help!!
  5. Keywords: LWP, threads
  6. Message-ID: <1992Sep4.165620.18296@noose.ecn.purdue.edu>
  7. Date: 4 Sep 92 16:56:20 GMT
  8. Sender: news@noose.ecn.purdue.edu (USENET news)
  9. Distribution: usa
  10. Organization: Purdue University Engineering Computer Network
  11. Lines: 32
  12.  
  13. Hi,
  14.  
  15. I'm trying to use Sun's LWP threads and I've run across something
  16. that may be a bug in the package. After spending half a dozen
  17. frustating hours, I decided to get some feedback from the net 
  18. before spending any sleepless nights. Here's what happened:
  19.  
  20. I first copied the sleep server example given in the LWP tutorial.
  21. This server has a communication thread that listens on a port, and
  22. whenever a client contacts it, starts off a new thread. The client
  23. gives it a timeout value and the newly created thread sleeps for that
  24. amount of time. The thread that listens on the port runs at a higher
  25. priority than the sleeper threads, so it uses non-blocking versions of
  26. the socket calls from libnbio.a.  The tutorial example uses the
  27. connectionless UDP protocol and this worked fine. Then I tried to
  28. implement a socket-stream version where the client and server talk on
  29. an established connection. This required me to use the accept call on
  30. the server side to establish the connection.  Whenever execution
  31. reaches the accept call, the server dumps core. Purify shows me that
  32. the error is due to a read attempt on location 0x0 within the accept
  33. call.
  34.  
  35. Has anyone else come across the same problem? Is there are workaround?
  36. The version of LWP I have appears to be about 2 years old. Have new
  37. versions of the package come out since then that fix the problem?
  38. Any help or suggestions are appreciated. I can send the source code of
  39. my program to anyone who's interested.
  40.  
  41. Please post or email me at kudva@ecn.purdue.edu
  42.  
  43. Thanks very much in advance,
  44. Gautham Kudva
  45.