nh2 (Niklas Hambüchen)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 6 2014, 6:30 PM (223 w, 2 d)

Recent Activity

Jun 21 2018

nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

Note for myself:

Jun 21 2018, 12:13 PM · GHC

Apr 28 2018

nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

I still feel slightly weird about doing kill(pid(),EPIPE) at 50Hz or whatever the context switch interval is set to. Maybe it's OK.

Apr 28 2018, 3:02 PM · GHC

Jan 9 2018

nh2 updated the diff for D42: Fix hWaitForInput not being interruptible (#8684)..

Implemented context-switching in non-threaded on non-Linux

Jan 9 2018, 3:42 PM · GHC
nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

I think the weird timing problems reported above might actually be due to Windows Defender's live scanning.

Jan 9 2018, 11:52 AM

Jan 6 2018

nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

There's another potential issue in current GHC I just found: I wrote:

Jan 6 2018, 9:02 PM · GHC
nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..
In D42#119712, @nh2 wrote:

Which OSThreadId id can I pass? [...] what is the correct way to obtain its number?

Jan 6 2018, 8:46 PM · GHC
nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

For my reference, https://ghc.haskell.org/trac/ghc/ticket/10840 is what introduced the timerfd usage and also the other uses of non-SIGVTALRM timers.
I wasn't aware that they were introduced as recently as GHC 8.2.

Jan 6 2018, 6:29 PM · GHC

Nov 29 2017

nh2 added inline comments to D42: Fix hWaitForInput not being interruptible (#8684)..
Nov 29 2017, 11:53 AM · GHC

Nov 28 2017

nh2 added inline comments to D42: Fix hWaitForInput not being interruptible (#8684)..
Nov 28 2017, 11:53 AM · GHC

Nov 27 2017

nh2 added inline comments to D4095: hWaitForInput-accurate-stdin.
Nov 27 2017, 11:03 AM
nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

For easier testing, I have provided binary distributions of this change backported to GHC 8.0.2 here: https://github.com/nh2/ghc/releases/tag/ghc-8.0.2-bug-8684-interruptible-hWaitForInput-iohk-2017-11-26

Nov 27 2017, 10:58 AM · GHC

Nov 26 2017

nh2 updated the diff for D42: Fix hWaitForInput not being interruptible (#8684)..

Also update user's guide

Nov 26 2017, 11:53 AM · GHC
nh2 added a comment to D42: Fix hWaitForInput not being interruptible (#8684)..

TODO for myself: I need to update the user's guide section Interruptible foreign calls with the information about the newly added events.

Nov 26 2017, 9:33 AM · GHC

Nov 25 2017

nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Update description from commit message

Nov 25 2017, 7:08 PM
nh2 updated the diff for D42: Fix hWaitForInput not being interruptible (#8684)..

Updated description from commit message

Nov 25 2017, 7:05 PM · GHC
nh2 abandoned D4237: Fix hWaitForInput not being interruptible (#8684)..

Disregard this; I just wanted to updated the description of D42 but the arc command I ran created a new revision instead.

Nov 25 2017, 7:01 PM
nh2 created D4237: Fix hWaitForInput not being interruptible (#8684)..
Nov 25 2017, 7:00 PM
nh2 updated the diff for D42: Fix hWaitForInput not being interruptible (#8684)..

Update commit message with good news

Nov 25 2017, 6:55 PM · GHC
nh2 added inline comments to D42: Fix hWaitForInput not being interruptible (#8684)..
Nov 25 2017, 6:24 PM · GHC
nh2 updated the diff for D42: Fix hWaitForInput not being interruptible (#8684)..

3 years after opening this, D42 is back!

Nov 25 2017, 5:21 PM · GHC
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Rebased

Nov 25 2017, 11:40 AM
nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Fix discarding of fractional milliseconds (relevant for non-Windows, and Windows character devices like cmd.exe and powershell)

Nov 25 2017, 11:39 AM
nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
In D4011#117088, @nh2 wrote:

Annoyingly, I cannot reproduce this time issue when I run it wrapped in date invocations: date '+%s%N' && time ../ghc-bug-13497-accuracy-test && date '+%s%N'. With that, time always reports slightly above 5 seconds, as expected.

Nov 25 2017, 11:16 AM
nh2 planned changes to D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

With testing from @syd I found that there is an edge case in which this commit doesn't fulfill its promise:

Nov 25 2017, 8:48 AM

Nov 23 2017

nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Rebase / cleanup

Nov 23 2017, 1:04 PM
nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Rebase / cleanup

Nov 23 2017, 1:03 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Rebase / cleanup

Nov 23 2017, 1:03 PM

Nov 16 2017

nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

I noticed that one invocation of make said just now (in another, new Win10 VM based on QEMU instead of VirtualBox):

Nov 16 2017, 6:31 AM

Nov 15 2017

nh2 created D4203: configure: Fix wrong AC_SUBST syntax in mingwex check..
Nov 15 2017, 6:50 PM
nh2 created D4200: users_guide: Fix "CancelSynchronousIo" casing.
Nov 15 2017, 7:04 AM

Nov 14 2017

nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Annoyingly, I cannot reproduce this time issue when I run it wrapped in date invocations: date '+%s%N' && time ../ghc-bug-13497-accuracy-test && date '+%s%N'. With that, time always reports slightly above 5 seconds, as expected.

Nov 14 2017, 9:37 AM
nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Testing the accuracy can be frustrating: In my Windows VM, in Mingw-w64 64bit, I get, very rarely, time measured by time that is not consistent with GHC's understanding of time, with significant difference:

Nov 14 2017, 7:03 AM
nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

@syd I've turned my comment into a CHECK() containing exactly the cases you mentioned.

Nov 14 2017, 6:35 AM
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Rebased

Nov 14 2017, 6:20 AM
nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Rebased

Nov 14 2017, 6:20 AM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Remove bit that says fdReady() doesn't support waiting indefinitely (it does)

Nov 14 2017, 6:20 AM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Make comment an assertion instead

Nov 14 2017, 4:52 AM

Nov 13 2017

nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Fix Windows build

Nov 13 2017, 7:30 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Fix Windows build

Nov 13 2017, 7:30 PM
nh2 requested review of D4041: fdReady: Use C99 bools / CBool in signature.
Nov 13 2017, 3:42 PM
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Fixing wrong arc upload

Nov 13 2017, 3:41 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Also update call site that used 0xFFFFFFFF on Windows

Nov 13 2017, 3:41 PM
nh2 added a comment to D4041: fdReady: Use C99 bools / CBool in signature.

What the hell, something messed up with arc again, wrong contents uploaded.

Nov 13 2017, 2:54 PM
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Also replace remaining while (1)

Nov 13 2017, 2:50 PM
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Use bool in signature of fdReady()

Nov 13 2017, 2:48 PM
nh2 reclaimed D4041: fdReady: Use C99 bools / CBool in signature.

but I'm not sure I'd want to change that signature

Nov 13 2017, 2:47 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Also update FFI signature of unsafe_fdReady

Nov 13 2017, 2:44 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Turn a few more ints into bools

Nov 13 2017, 2:41 PM
nh2 requested review of D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Please take another look after I improved logic handling. I also have to re-run my manual tests (but have already pushed before so that phab can build my changes in parallel).

Nov 13 2017, 2:36 PM
nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Rebased

Nov 13 2017, 2:35 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Improved poll/select logic and readability

Nov 13 2017, 2:34 PM
nh2 abandoned D4041: fdReady: Use C99 bools / CBool in signature.

I'm abandoning this diff and folding it directly into D4011 and D4012, as those are actually the only ones introducing int /* bool */ style ints (except from the signature of fdReady() itself, which has int isSock, but I'm not sure I'd want to change that signature).

Nov 13 2017, 2:26 PM

Oct 25 2017

nh2 updated subscribers of D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

@bgamari A bug was found by @syd in a corner case, I'll be fixing that.

Oct 25 2017, 7:03 PM

Sep 28 2017

nh2 planned changes to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 28 2017, 9:38 AM
nh2 reclaimed D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 28 2017, 9:38 AM
nh2 abandoned D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 28 2017, 9:38 AM

Sep 27 2017

nh2 added a comment to D4041: fdReady: Use C99 bools / CBool in signature.
In D4041#112998, @Phyx wrote:

Aren't you missing #include <stdbool.h>?

Sep 27 2017, 4:04 PM
nh2 updated the diff for D4041: fdReady: Use C99 bools / CBool in signature.

Add import

Sep 27 2017, 4:03 PM
nh2 added inline comments to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 27 2017, 4:01 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Fix assert bool flip

Sep 27 2017, 4:00 PM
nh2 added inline comments to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 27 2017, 3:34 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Added assertion and more comments

Sep 27 2017, 3:33 PM
nh2 added a parent revision for D4041: fdReady: Use C99 bools / CBool in signature: D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.
Sep 27 2017, 3:29 PM
nh2 created D4041: fdReady: Use C99 bools / CBool in signature.
Sep 27 2017, 3:29 PM
nh2 added inline comments to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 27 2017, 3:07 PM
nh2 added inline comments to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 27 2017, 2:31 PM
nh2 added a comment to D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
In D4011#112953, @Phyx wrote:

Your summary is incorrect, Windows 64-bit is LLP64, so long long & pointers are 64bit long.

Sep 27 2017, 2:17 PM
nh2 added inline comments to D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.
Sep 27 2017, 7:41 AM
nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Fix comments

Sep 27 2017, 7:41 AM

Sep 26 2017

nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Rebase

Sep 26 2017, 8:35 AM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Rebase

Sep 26 2017, 8:35 AM
nh2 updated the diff for D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1.

Rebase

Sep 26 2017, 8:35 AM
nh2 updated the diff for D3965: fdReady(): Fix some C -Wconversion warnings..

Rebase

Sep 26 2017, 8:35 AM
nh2 updated the diff for D3964: Add TODO about getMonotonicNSec() wrapping that can no longer happen..

Rebase

Sep 26 2017, 8:35 AM
nh2 updated the diff for D3962: base: fdReady(): Add note about O_NONBLOCK requirement.

Fix accidentally updated submodule

Sep 26 2017, 8:22 AM

Sep 22 2017

nh2 updated the diff for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.

Rebased

Sep 22 2017, 6:44 PM
nh2 updated the diff for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..

Rebased

Sep 22 2017, 6:43 PM
nh2 updated the diff for D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1.

Rebased

Sep 22 2017, 6:43 PM
nh2 updated the diff for D3965: fdReady(): Fix some C -Wconversion warnings..

Rebased

Sep 22 2017, 6:43 PM
nh2 updated the diff for D3964: Add TODO about getMonotonicNSec() wrapping that can no longer happen..

Rebased

Sep 22 2017, 6:43 PM
nh2 updated the diff for D3962: base: fdReady(): Add note about O_NONBLOCK requirement.

Rebased

Sep 22 2017, 6:42 PM
nh2 removed a child revision for D3961: base: fdReady(): Assert that `msecs` is >= 0: D3962: base: fdReady(): Add note about O_NONBLOCK requirement.
Sep 22 2017, 1:03 PM
nh2 edited parent revisions for D3962: base: fdReady(): Add note about O_NONBLOCK requirement, added: 1; removed: 1.
Sep 22 2017, 1:03 PM
nh2 added a child revision for D3960: base: Add more detail to FD_SETSIZE related error message: D3962: base: fdReady(): Add note about O_NONBLOCK requirement.
Sep 22 2017, 1:03 PM
nh2 added a parent revision for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262.: D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1.
Sep 22 2017, 1:03 PM
nh2 added a parent revision for D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed: D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 22 2017, 1:03 PM
nh2 added a child revision for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262.: D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.
Sep 22 2017, 1:03 PM
nh2 added a parent revision for D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1: D3965: fdReady(): Fix some C -Wconversion warnings..
Sep 22 2017, 1:03 PM
nh2 added a child revision for D3965: fdReady(): Fix some C -Wconversion warnings.: D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1.
Sep 22 2017, 1:03 PM
nh2 added a child revision for D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1: D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 22 2017, 1:03 PM
nh2 abandoned D3961: base: fdReady(): Assert that `msecs` is >= 0.

Abandoning this in favour of https://phabricator.haskell.org/D4011, which fixes the found issues.

Sep 22 2017, 1:03 PM
nh2 added a reviewer for D3964: Add TODO about getMonotonicNSec() wrapping that can no longer happen.: NicolasT.
Sep 22 2017, 1:03 PM
nh2 added a reviewer for D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262.: NicolasT.
Sep 22 2017, 1:03 PM
nh2 created D4011: base: fdReady(): Fix timeouts > ~49 days overflowing. Fixes #14262..
Sep 22 2017, 1:03 PM
nh2 created D4012: base: fdReady(): Return only after sycall returns after `msecs` have passed.
Sep 22 2017, 1:03 PM
nh2 created D4010: base: fdReady(): Ensure and doc that return values are always -1/0/1.
Sep 22 2017, 1:03 PM
nh2 updated the diff for D3965: fdReady(): Fix some C -Wconversion warnings..

Rebase

Sep 22 2017, 1:03 PM
nh2 updated the diff for D3964: Add TODO about getMonotonicNSec() wrapping that can no longer happen..

Rebase

Sep 22 2017, 1:03 PM
nh2 updated the diff for D3962: base: fdReady(): Add note about O_NONBLOCK requirement.

Rebased

Sep 22 2017, 1:03 PM
nh2 added a comment to D3954: base: Fix fdReady() potentially running forever on Windows..

It looks like this currently fails to validate:

ghc.exe: | C:\msys64\var\drydock\workingcopy-41165\repo\glasgow-haskell-compiler\bindisttest\install dir\lib\base-4.10.0.0\HSbase-4.10.0.0.o: unknown symbol `getProcessElapsedTime'
Sep 22 2017, 12:17 PM