jacereda / fsatrace

Filesystem access tracer
ISC License
78 stars 12 forks source link

failures on ubuntu 20.04 #35

Closed samth closed 4 years ago

samth commented 4 years ago

Changes on Ubuntu 20.04 seem to break several pretty basic things.

First, make test fails because resolv of __xlstat fails. Changing line 502 of fsatraceso.c to always use __xstat causes things to work.

Second, the unlinkat function (also in fsatraceso.c) contains an unconditional assert(0) on line 321. I think there should be an else before that; adding it makes thing work.

cc @spall @ndmitchell

jacereda commented 4 years ago

Hi and thanks for the report.

How do you reproduce the second problem? I'd like to report a full path there via d instead of the relative signaled by D, that's the reason for the assert.

jacereda commented 4 years ago

As for the first one, I just pushed something that I think should be better (hooks __lxstat).

samth commented 4 years ago

It's a larger program (using Rattle to build Chez Scheme) but I'll try to come up with something small as an example.

samth commented 4 years ago

Here's the unlinkat error (which still looks to me like a missing else). I added a printf of the arguments to unlinkat, it appears right before the assertion.

[samth@homer:~/sw/ChezScheme (newBuild) plt] cat > x.txt
foo
[samth@homer:~/sw/ChezScheme (newBuild) plt] fsatrace rwmdqt /tmp/extra-file-77292089623276-128708-70 -- gzip -f x.txt 
unlinkat p x.txt fd 4 f 0
gzip: src/unix/fsatraceso.c:322: unlinkat: Assertion `0' failed.

Here it is in the original context:

gzip -f /tmp/chez/share/man/scheme.1
unlinkat p scheme.1 fd 4 f 0
gzip: src/unix/fsatraceso.c:322: unlinkat: Assertion `0' failed.
schemeBuild: Development.Shake.cmd, system command failed
Command line: fsatrace rwmdqt /tmp/extra-file-77292089623276-128708-70 -- gzip -f /tmp/chez/share/man/scheme.1
Original command line: gzip -f /tmp/chez/share/man/scheme.1
Exit code: 6
Stderr:
unlinkat p scheme.1 fd 4 f 0
gzip: src/unix/fsatraceso.c:322: unlinkat: Assertion `0' failed.

CallStack (from HasCallStack):
  cmd, called at src/Development/Rattle/Server.hs:298:20 in rattle-0.1-9ZMDQrRDyU0FZaKMn4KbzB:Development.Rattle.Server
jacereda commented 4 years ago

Could you check if the current master fixes it?

samth commented 4 years ago

Looks like it's all working now, thanks!