Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to attach to nix build #16

Closed
eonpatapon opened this issue Dec 16, 2019 · 7 comments
Closed

Failing to attach to nix build #16

eonpatapon opened this issue Dec 16, 2019 · 7 comments

Comments

@eonpatapon
Copy link

I'm using cntr from nixpkgs 19.09 (on NixOS), doesn't matter of which package build I'm trying to debug, it just fails ans locks completely the terminal

sudo RUST_BACKTRACE=full cntr attach -t command cntr-/nix/store/ih6pz06jrn806lx1315gc1djklxh6zfc-terraform-provider-keycloak-1.13.2
[sudo] password for eon: 
WARNING: the per-user profile dir /nix/var/nix/profiles/per-user/root should belong to user id 1000
thread '<unnamed>' panicked at 'BUG! got unknown d_entry type received from d_type', src/fs.rs:602:14
stack backtrace:
0:     0x55c51067844c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd5cf01a6458823ce
1:     0x55c51065f72d - core::fmt::write::h239984b34be80164
2:     0x55c510677151 - std::io::Write::write_fmt::h71b3597bde52e201
3:     0x55c51067a490 - std::panicking::default_hook::{{closure}}::h22b55119be64c15e
4:     0x55c510679f65 - std::panicking::rust_panic_with_hook::hc671c362d83d7750
5:     0x55c510658684 - std::panicking::begin_panic::hbfd0096d822b4d01
6:     0x55c51060d92a - cntr::fs::CntrFs::generic_readdir::h62575c5ba9c58ab2
7:     0x55c51061733f - fuse::request::Request::dispatch::h596ab4aba69542f6
8:     0x55c510651452 - std::sys_common::backtrace::__rust_begin_short_backtrace::h800c518d8b197517
9:     0x55c51063e146 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h2f3283e15ccecb31
10:     0x55c510676c5f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h36570ddedd92a948
11:     0x55c510677dac - std::sys::unix::thread::Thread::new::thread_start::hac7b969fab3af94c
12:     0x7f46fce81ef7 - start_thread
13:     0x7f46fcba122f - __GI___clone
14:                0x0 - <unknown>
@Mic92
Copy link
Owner

Mic92 commented Dec 16, 2019

If this error is reproducible than I could send you a version of cntr that actually prints the unsupported d_entry type.

@eonpatapon
Copy link
Author

Sure, anything I can do to debug this

@Mic92
Copy link
Owner

Mic92 commented Dec 25, 2019

Ok. Could build and run cntr from that commit: 4396e55

@eonpatapon
Copy link
Author

sudo RUST_BACKTRACE=full cntr attach -t command cntr-/nix/store/xzdj2aah47qjkdysjv7ld9k1ls7yqw62-git-hub-1.0.3
WARNING: the per-user profile dir /nix/var/nix/profiles/per-user/root should belong to user id 1000
thread '<unnamed>' panicked at 'BUG! got unknown d_entry type received from d_type: 0', src/fs.rs:602:14
stack backtrace:
0:     0x5605054e352c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd5cf01a6458823ce
1:     0x5605054ca77d - core::fmt::write::h239984b34be80164
2:     0x5605054e2231 - std::io::Write::write_fmt::h71b3597bde52e201
3:     0x5605054e5570 - std::panicking::default_hook::{{closure}}::h22b55119be64c15e
4:     0x5605054e5045 - std::panicking::rust_panic_with_hook::hc671c362d83d7750
5:     0x5605054e4c0f - std::panicking::continue_panic_fmt::h65e4009de34f6bc6
6:     0x5605054e4bb9 - std::panicking::begin_panic_fmt::h3ee1dd8002c2d90b
7:     0x560505478978 - cntr::fs::CntrFs::generic_readdir::h62575c5ba9c58ab2
8:     0x56050548238f - fuse::request::Request::dispatch::h596ab4aba69542f6
9:     0x5605054bc4b2 - std::sys_common::backtrace::__rust_begin_short_backtrace::h800c518d8b197517
10:     0x5605054a91a6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h2f3283e15ccecb31
11:     0x5605054e1d3f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h36570ddedd92a948
12:     0x5605054e2e8c - std::sys::unix::thread::Thread::new::thread_start::hac7b969fab3af94c
13:     0x7fef56c42ef7 - start_thread
14:     0x7fef5696222f - __GI___clone
15:                0x0 - <unknown>

@Mic92
Copy link
Owner

Mic92 commented Dec 28, 2019

That's interesting 0 means DT_UNKNOWN and there is no use equivalent: https://github.com/zargony/fuse-rs/blob/bf6d1cf03f3277e35b580f3c7b9999255d72ecf3/src/lib.rs#L34
I could map this onto a regular file... It would be interesting what inode has an unknown type.

@Mic92
Copy link
Owner

Mic92 commented Dec 28, 2019

@Mic92
Copy link
Owner

Mic92 commented Dec 28, 2019

It was actually documented here: zargony/fuse-rs#115

Mic92 added a commit that referenced this issue Oct 28, 2020
@Mic92 Mic92 closed this as completed in ddf143a Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants