Shinmera / file-attributes

Access to common file attributes (uid, gid, permissions, ctime, mtime, atime)
https://shinmera.github.io/file-attributes
zlib License
13 stars 2 forks source link

Kernel version requirement on Linux? #3

Closed Ambrevar closed 3 years ago

Ambrevar commented 3 years ago

I was reported this (https://github.com/atlas-engineer/nyxt/issues/324#issuecomment-806362957) on Nyxt:

[13:52:29] Listening to socket "/home/my_username/.local/share/nyxt/nyxt.socket".
Nyxt version dont-use-this-tag6
[13:52:29] Loading Lisp file "/home/my_username/.config/nyxt/auto-config.lisp".
Unhandled SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR in thread #<SB-THREAD:THREAD "Anonymous thread" RUNNING
{100705F893}>:
The alien function "stat" is undefined.

Backtrace for: #<SB-THREAD:THREAD "Anonymous thread" RUNNING {100705F893}>
0: ("undefined function")
1: (ORG.SHIRAKUMO.FILE-ATTRIBUTES::STAT "/home/my_username/.local/share/nyxt/nyxt.socket")
2: (ORG.SHIRAKUMO.FILE-ATTRIBUTES:ATTRIBUTES "/home/my_username/.local/share/nyxt/nyxt.socket")
3: (NYXT::SET-PERMISSIONS "/home/my_username/.local/share/nyxt/nyxt.socket" :GROUP-READ NIL :GROUP-WRITE NIL :GROUP-EXECUTE NIL :OTHER-READ NIL :OTHER-WRITE NIL :OTHER-EXECUTE NIL)
4: (NYXT::LISTEN-SOCKET)
5: ((LAMBDA NIL :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
6: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
7: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-THREAD::RUN))
8: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
9: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::RUN))
10: (SB-THREAD::RUN)
11: ("foreign function: call_into_lisp")
12: ("foreign function: funcall1")

Any idea how that's possible?

The user runs Linux 4.19. Could the grovelling depend on some later features of Linux?

Shinmera commented 3 years ago

No. Stat was defined in like the first Unix.

Ambrevar commented 3 years ago

Any idea what the issue could be then? Any direction to explore?

Shinmera commented 3 years ago

Custom SBCL that was linked against a weird libc where stat isn't a function? But in that case I'd expect a lot of other stuff to go wrong, so I really don't know.

Ambrevar commented 3 years ago

Hmm... OK, I'll investigate.

Ambrevar commented 3 years ago

I think the issue indeed comes from the glibc which is different between the host and the target. So this has probably nothing to do with file-attributes. Sorry about the noise! :p

Shinmera commented 3 years ago

No problem. Stuff like this can be extremely confusing, so I feel ya!

Shinmera commented 3 years ago

It looks like on some distributions stat is an inline function to __xstat. I'll add a fallback for that.