Re: [GHC] #7482: GHC.Event overwrites main IO managers hooks to RTS
#7482: GHC.Event overwrites main IO managers hooks to RTS -+-- Reporter: AndreasVoellmy| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: libraries/base| Version: 7.4.1 Keywords: IO Manager, RTS | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by AndreasVoellmy): Here is a proposal to fix this problem: remove 'new' from GHC.Event public interface. Then users can only use the built-in IO manager, and therefore the problem above will not arise. No projects on hackage use GHC.Event.new. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7482#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #7482: GHC.Event overwrites main IO managers hooks to RTS
#7482: GHC.Event overwrites main IO managers hooks to RTS -+-- Reporter: AndreasVoellmy| Owner: Type: bug | Status: new Priority: normal| Component: libraries/base Version: 7.4.1 | Keywords: IO Manager, RTS Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking:|Related: -+-- The IO manager registers two file descriptors with the RTS which the RTS uses to send control and wakeup signals to the IO manager. The main IO manager is started up by default and registers some file descriptors that it has allocated with the RTS. The base package also exposes a GHC.Event module which when initialized will also register files with the RTS, overwriting the main IO manager's files. Now the RTS can no longer signal the main IO manager. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7482 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7482: GHC.Event overwrites main IO managers hooks to RTS
#7482: GHC.Event overwrites main IO managers hooks to RTS -+-- Reporter: AndreasVoellmy| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: libraries/base| Version: 7.4.1 Keywords: IO Manager, RTS | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonpj): * difficulty: = Unknown Comment: Andreas: do you know how to fix this? (I don't.) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7482#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7482: GHC.Event overwrites main IO managers hooks to RTS
#7482: GHC.Event overwrites main IO managers hooks to RTS -+-- Reporter: AndreasVoellmy| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: libraries/base| Version: 7.4.1 Keywords: IO Manager, RTS | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Comment(by AndreasVoellmy): Here is a possible fix: GHC.Event.new should create a new IO manager, but should not register the control file descriptors with the RTS. The result is that the main IO manager's control file descriptors are still registered with the RTS, but the RTS now has no way of sending control or wakeup messages to the user's IO manager. From what I can tell, the RTS uses the registered file descriptors in the following ways: 1. to call ensureIOManagerIsRunning, which starts the main (i.e. built-in) IO manager. 2. to call ioManagerWakeup, to wake up one arbitrary OS thread to enter the scheduler loop. 3. to call ioManagerDie 4. to pass an OS signal to the IO manager. I'm fairly certain that only the main IO manager needs to get 1,2 or 4. I'm not absolutely certain about 3. I.e. I'm not sure if it is OK that the RTS cannot tell the user's manager to return from a blocking poll call that it may be in and exit its polling loop. If that is important, then we may need to provide a method for the main IO manager to send the same message to the user's IO manager; i.e. upon initializing the user's IO manager, we add a reference to it in the main IO manager. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7482#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7482: GHC.Event overwrites main IO managers hooks to RTS
#7482: GHC.Event overwrites main IO managers hooks to RTS -+-- Reporter: AndreasVoellmy| Owner: Type: bug | Status: new Priority: normal| Milestone: Component: libraries/base| Version: 7.4.1 Keywords: IO Manager, RTS | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown |Testcase: Blockedby:|Blocking: Related:| -+-- Changes (by simonpj): * cc: johan.tibell@… (added) Comment: Adding Johan in cc who knows about this stuff. I hope. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7482#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs