home *** CD-ROM | disk | FTP | other *** search
- 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
- From: kudva@ecn.purdue.edu (Gautham K. Kudva)
- Newsgroups: comp.unix.programmer
- Subject: Sun LWP bug? Help!!
- Keywords: LWP, threads
- Message-ID: <1992Sep4.165620.18296@noose.ecn.purdue.edu>
- Date: 4 Sep 92 16:56:20 GMT
- Sender: news@noose.ecn.purdue.edu (USENET news)
- Distribution: usa
- Organization: Purdue University Engineering Computer Network
- Lines: 32
-
- Hi,
-
- I'm trying to use Sun's LWP threads and I've run across something
- that may be a bug in the package. After spending half a dozen
- frustating hours, I decided to get some feedback from the net
- before spending any sleepless nights. Here's what happened:
-
- I first copied the sleep server example given in the LWP tutorial.
- This server has a communication thread that listens on a port, and
- whenever a client contacts it, starts off a new thread. The client
- gives it a timeout value and the newly created thread sleeps for that
- amount of time. The thread that listens on the port runs at a higher
- priority than the sleeper threads, so it uses non-blocking versions of
- the socket calls from libnbio.a. The tutorial example uses the
- connectionless UDP protocol and this worked fine. Then I tried to
- implement a socket-stream version where the client and server talk on
- an established connection. This required me to use the accept call on
- the server side to establish the connection. Whenever execution
- reaches the accept call, the server dumps core. Purify shows me that
- the error is due to a read attempt on location 0x0 within the accept
- call.
-
- Has anyone else come across the same problem? Is there are workaround?
- The version of LWP I have appears to be about 2 years old. Have new
- versions of the package come out since then that fix the problem?
- Any help or suggestions are appreciated. I can send the source code of
- my program to anyone who's interested.
-
- Please post or email me at kudva@ecn.purdue.edu
-
- Thanks very much in advance,
- Gautham Kudva
-