[haiku-gsoc] Re: Swift port compiler hangs on poll()

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Fri, 23 Jun 2017 22:29:47 +0200

On Fri, Jun 23, 2017 at 08:19:09PM +0000, Joseph Calvin Hill wrote:

Hello!

Just as I have already pointed out in my recent blogposts, the swift compiler
seem to be hang when generating a executable. I ran a strace on the binary and
it seems to be looping on poll(), but I’m not sure if this behaviour is
related to ticket #13546.

The code that it loops around is in 
TaskQueue.inc<https://github.com/return/swift/blob/swift-3.1-haiku/lib/Basic/Unix/TaskQueue.inc>
 from line(s) 326 to 444. Here is the tracing output https://0x0.st/Uqc.txt. ;
Any suggestions?

It's hard to tell with just the strace, but it looks like poll is
telling that some file descriptor is readable (or at least, Swift thinks
so), but then when trying to read, there are 0 bytes read.

From the code around these lines, I assume that the file descriptor here
are pipes with the input in other processes. Possibly we do something
unusual when the remote end of a pipe is closed?

-- 
Adrien.

Other related posts: