Closed codygman closed 4 years ago
I encounter the same issue in my fairly vanilla Spacemacs config but only when I try to C-x C-f/SPC f f (handled by HELM in my case).
Could you post your minimal config and exact instructions on how to reproduce this error?
.spacemacs from atemu/dotfiles@ac526f496eccda63ebacacf77fc356651756ed31
.emacs.d is syl20bnr/spacemacs@d95d41f55ba074128b3ed8f0eedcdc3c31b52e42
emacs
I ran into the same issue. Using ivy
instead of helm
doesn't trigger this bug.
There seems to be a fix in https://github.com/0pq76r/proot/commit/7d7479c490de083729253f120a5e9a9c5bd47d0c but it's not yet upstream.
I am finally able to reproduce it:
emacs -Q --batch --eval '(directory-files-and-attributes "/data/data/com.termux.nix/files/usr/bin" nil "\\`[^.]" t (quote string))'
Nice, i can confirm to get the same error. But could you explain, what this does and what similar commands you tried that worked? I'm asking for so many details because I have neither used emacs nor came in touch with the nix expression of emacs and its dependencies.
I basically opened an eshell
within emacs and did an ls
in the usr/bin
directory and that crashed, other directories work just fine. Afterwards I stepped through the callstack and ended up in the function mentioned above. Said function is implemented in C which makes debugging much harder. Currently, I'm trying to extract a single C function that triggers the bug, based on this source: https://github.com/emacs-mirror/emacs/blob/c70a3a41630a39283f10f183cefb4643a6d424cc/src/dired.c#L166
Just tried again, a simple ls -a
in my $HOME from within eshell does also crash. That means, it's not specific to the directory but its contents somehow. Doing the same things using the real ls
and not the emacs version, works in all cases.
It seems to be the link to /nix
, i.e. the .nix-profile
. I tried the following steps:
emacs -Q
M-x eshell
mkdir tmp
cd tmp
ls
# ok
ln -s /nix .
ls
# bam
Does it fail the same with other proot-rerouted locations like /tmp
or /usr
?
Should we incorporate the fix linked above in advance into our proot build?
Funny, /tmp
is ok, /etc
/bin
are not. That might be because /tmp
doesn't contain links into proot bindings as the other directories do.
Hi, how can I get a custom version of proot into my nix-on-droid installation? I'm still a noob regarding nix :(
Btw. the issue is reproducible on my laptop as well, but I didn't have time to figure out which syscall fails in proot. My goal is to have a unit test along with a fix for proot.
Is there an irc (or similar) channel for nix-on-droid?
It's not a particularly simple process, as it can't be built on-device (refer to https://gist.github.com/t184256/c79d270498e8441d0f4e3c9be7acad18 if you want an overview of how the building happens and how to start with your own channels and bootstrap zipballs).
Meanwhile, you can try bootstrapping from https://nix-on-droid.unboiled.info/bootstrap-proot-fix (corresponds to proot-fix
branch, where I've applied patch mentioned above to proot) and verify whether it fixes the issue.
As for a support chat, we don't have any, though maybe we should have one. Got any specific suggestions?
The fix seems to work. I replaced my proot-static binary with the one from your package and emacs does not crash anymore.
I've merged the fix (9b4fb44) into the master branch then.
Warning: no reproduction yet
[ ] - bisect packages to identify package triggering paths.c [ ] - create minimal repro with
emacs -Q
Using my quite large emacs config i get the following error.
Putting this here in this pre repro state in case others want to see state of emacs support or someone recognizes that error.
I'll debug this further as time allows.