home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20625 < prev    next >
Encoding:
Text File  |  1992-12-16  |  2.6 KB  |  63 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!think.com!mintaka.lcs.mit.edu!wyvern
  3. From: wyvern@gnu.ai.mit.edu (The Wyvern)
  4. Subject: Re: [Q] Bug in select(2)?
  5. Message-ID: <1992Dec16.082553.8574@mintaka.lcs.mit.edu>
  6. Keywords: select
  7. Sender: news@mintaka.lcs.mit.edu
  8. Organization: Free Software Foundation
  9. References: <10DEC199211081583@addvax.llnl.gov>
  10. Date: Wed, 16 Dec 1992 08:25:53 GMT
  11. Lines: 50
  12.  
  13. In article <10DEC199211081583@addvax.llnl.gov> brand@addvax.llnl.gov (Hal R. Brand, LLnL, 510-422-6312) writes:
  14. >I just tried to get the Diku client TINTIN running under Linux. With just a
  15. >little futzing, it compiled and fired up printing its banner and prompt.
  16. >However, upon typing the first character, TINTIN aborted due to an error in
  17. >read(2) on fd 0; the error was errno=4, Interrupted system call. After some
  18. >playing, I was able to isolate what I think is the problem: select(2) returns
  19. >that fd 0 has input ready immediately following the typing of the first
  20. >character, but read(2) on fd 0 blocks until the whole line is available (i.e.
  21. >until you hit the <return> key). When TINTIN's timer (via alarm(3)) goes off,
  22. >the (blocking) read(2) returns with and error and errno set to 4. The program
  23. >below demonstrates the problem. Under Ultrix and SunOS, I never get any "I"s
  24. >printed ("I"s indicate that "read(0,...)" was blocking when the SIGALRM was
  25. >delivered). But, under Linux, I get the "I"s after every SIGALRM (indicated
  26. >by a "T" being printed) following typing the first character of input.
  27. >
  28. >Is there something special about the Linux select(2), or read(2), or
  29. >possibly the mode BASH leaves the terminal driver in that I don't know about,
  30. >or have I misinterpreted the data, or is it a bug?
  31. >
  32. >Hardware Config:
  33. >    486-50 (OPTI) with 8 Mybte
  34. >    Maxtor 130 Mbyte
  35. >      Part. 1 is 64 Mybte DOS
  36. >      Part. 2 is  8 Mbyte Linux swap
  37. >      Part. 3 is 64 Mbyte Linux/Minix fs
  38. >    NO ethernet board
  39. >Software Config:
  40. >    Latest SLS (a,b,c,x)
  41. >      
  42. >                    Hal R. Brand
  43. >                    LLNL
  44. >                    brand@addvax.llnl.gov
  45.  
  46. I've also been noticing some strange behavior which seems to be also due to
  47. select(2), although it doesn't seem to be of the same type as mentioned
  48. above. I'm running a client/server program that uses sockets of type AF_INET.
  49. Up until 0.99 I wasn't having problems but now clients and servers are getting
  50. stuck. They just hang. ps -l shows the WCHAN for the hung processes as
  51. tcp_read
  52. when normally it shows do_select when they're working correctly. The programs
  53. work for an indefinite period of time before locking up completely, at which point
  54. I have to kill the processes and restart them.
  55. System configuration:
  56.     486-33 8mb RAM
  57.     200 mb IDE hd
  58.     Linux v0.99 with TCP/IP
  59.     also no ethernet board
  60.  
  61.  
  62.  
  63.