Closed lf- closed 1 year ago
I've not had any luck getting terribly useful debug symbols for Python unfortunately. It seems that there's something funny going on with Nix's enableDebugging
that is not giving source file names in my backtrace. Not sure what the deal is there.
Hi! I've verified that this only happens on 3.10 and does not reproduce on 3.8 so it is (probably) not a nix related bug. On one hand, heck yeah. On the other, this still needs fixing at some point.
Thanks for the report. This looks interesting. Could you try patching the fsmonitor
logic to make it show traces so we can have some ideas about which Python statement causes the segfault?
diff --git a/eden/scm/edenscm/ext/fsmonitor/__init__.py b/eden/scm/edenscm/ext/fsmonitor/__init__.py
--- a/eden/scm/edenscm/ext/fsmonitor/__init__.py
+++ b/eden/scm/edenscm/ext/fsmonitor/__init__.py
@@ -1208,6 +1208,11 @@
def reposetup(ui, repo):
+ from trace import Trace
+ t = Trace(count=0, trace=1)
+ t.runfunc(_reposetup, ui, repo)
+
+def _reposetup(ui, repo):
# We don't work with largefiles or inotify
exts = extensions.enabled()
for ext in _incompatible_list:
You might need to delete __pycache__
and run CHGDISABLE=1 sl ...
for the change to take effect.
Here's the tail of it :)
Thanks for the information. We noticed the fcntl
can also fail with an unexpected errno 14 on ARM arch, which is likely the cause for #184.
I drafted a fix and it might take a while to get it merged and released.
Thanks to sggutier, I've got the ability to edit Python files worked out. I'm investigating why the nixpkgs build of Sapling for macOS is broken, and I think I've found a bug.
Downstream report: https://github.com/NixOS/nixpkgs/pull/202754
When I clone a repository with the oss build of Sapling, it does a segmentation fault. I've traced it down to
https://github.com/facebook/sapling/blob/1be0635ed4072091c1c13a2e6660bd185ee889d8/eden/scm/edenscm/hg.py#L168-L171
which I've added some printf debugging to:
With that context, here's it crashing in a debugger:
Running it in lldb
``` $ nix-shell -E 'with import (builtins.fetchTarball "https://github.com/nixos/nixpkgs /archive/872fceeed60ae6b7766cc0a4cd5bf5901b9098ec.tar.gz") {}; mkShell { packages = [ yarn libiconv std env openssl curl pkg-config darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Secu rity darwin.apple_sdk.frameworks.CoreServices python3 ]; }' [nix-shell:~/dev/sapling2/eden/scm]$ make oss [nix-shell:~/dev/sapling2/eden/scm]$ rm -rf polkadots && CHGDISABLE=1 lldb -- ./sl clone https://github.com/lf-/polkadots (lldb) target create "./sl" Current executable set to '/Users/jade/dev/sapling2/eden/scm/sl' (arm64). (lldb) settings set -- target.run-args "clone" "https://github.com/lf-/polkadots" (lldb) r Process 36765 launched: '/Users/jade/dev/sapling2/eden/scm/sl' (arm64) doing 'tweakdefaults'Notes
System details: macOS 12.6.1 on aarch64; packages from Nix.