httm: readme mentions illumos/solaris but this does not seem to build
Before you begin
- Have you tried with the latest version of
httm?
Yes
- Have you read the README and/or the help (
httm -horman httm)?
README, yes, man page, no.
- Is this actually a bug report?
Sort of? I was not really expecting it to build/run.
Removing the reference to illumos (did not try on actual solaris as I have no access to that) from the README is probably OK.
Describe the bug httm fails to build, more specifically I think (not super familiar with rust) a dependent crate. (I think xattr)
To Reproduce Steps to reproduce the behavior:
- boot a illumos system (I tried omnios)
- Install rust, gcc, …
- run
cargo install --git https://github.com/kimono-koans/httm.git --tag 0.30.0
Expected behavior It to build as illumos was mentioned in the README
Screenshots N/a but I have the output from cargo install
Updating git repository `https://github.com/kimono-koans/httm.git`
Installing httm v0.30.0 (https://github.com/kimono-koans/httm.git?tag=0.30.0#2e60aceb)
Updating git repository `https://github.com/kimono-koans/timer.rs`
Updating crates.io index
Downloaded aho-corasick v1.0.4
Downloaded scopeguard v1.2.0
Downloaded errno v0.3.2
Downloaded shlex v1.1.0
Downloaded strsim v0.10.0
Downloaded fuzzy-muff v0.3.10
Downloaded thread_local v1.1.7
Downloaded derive_builder_macro v0.12.0
Downloaded darling_macro v0.14.4
Downloaded memoffset v0.9.0
Downloaded fnv v1.0.7
Downloaded ident_case v1.0.1
Downloaded utf8parse v0.2.1
Downloaded number_prefix v0.4.0
Downloaded dirs-next v2.0.0
Downloaded simd-adler32 v0.3.7
Downloaded static_assertions v1.1.0
Downloaded itoa v1.0.9
Downloaded lazy_static v1.4.0
Downloaded cfg-if v1.0.0
Downloaded iana-time-zone v0.1.57
Downloaded version_check v0.9.4
Downloaded env_logger v0.10.0
Downloaded clap_lex v0.2.4
Downloaded xattr v1.0.1
Downloaded filetime v0.2.22
Downloaded partition-identity v0.3.0
Downloaded vte_generate_state_changes v0.1.1
Downloaded is-terminal v0.4.9
Downloaded which v4.4.0
Downloaded deranged v0.3.8
Downloaded dirs-sys-next v0.1.2
Downloaded num_threads v0.1.6
Downloaded atty v0.2.14
Downloaded equivalent v1.0.1
Downloaded crossbeam-deque v0.8.3
Downloaded autocfg v1.1.0
Downloaded termcolor v1.2.0
Downloaded quote v1.0.33
Downloaded terminal_size v0.2.6
Downloaded defer-drop v1.3.0
Downloaded proc-mounts v0.3.0
Downloaded thiserror-impl v1.0.47
Downloaded bitflags v2.4.0
Downloaded os_str_bytes v6.5.1
Downloaded time-core v0.1.1
Downloaded humantime v2.1.0
Downloaded derive_builder_core v0.12.0
Downloaded time-macros v0.2.12
Downloaded either v1.9.0
Downloaded thiserror v1.0.47
Downloaded lscolors v0.14.0
Downloaded nu-ansi-term v0.47.0
Downloaded darling v0.14.4
Downloaded bitflags v1.3.2
Downloaded crossbeam-utils v0.8.16
Downloaded log v0.4.20
Downloaded unicode-width v0.1.10
Downloaded num_cpus v1.16.0
Downloaded ahash v0.8.3
Downloaded ryu v1.0.15
Downloaded vte v0.11.1
Downloaded crossbeam-epoch v0.9.15
Downloaded console v0.15.7
Downloaded unicode-ident v1.0.11
Downloaded derive_builder v0.12.0
Downloaded darling_core v0.14.4
Downloaded indexmap v1.9.3
Downloaded textwrap v0.16.0
Downloaded tuikit v0.5.0
Downloaded memchr v2.5.0
Downloaded once_cell v1.18.0
Downloaded num-traits v0.2.16
Downloaded crossbeam-channel v0.5.8
Downloaded proc-macro2 v1.0.66
Downloaded term v0.7.0
Downloaded indexmap v2.0.0
Downloaded rayon-core v1.11.0
Downloaded serde v1.0.171
Downloaded indicatif v0.17.6
Downloaded libc v0.2.147
Downloaded hashbrown v0.14.0
Downloaded portable-atomic v1.4.2
Downloaded two_percent v0.10.19
Downloaded time v0.3.26
Downloaded serde_json v1.0.105
Downloaded hashbrown v0.12.3
Downloaded rayon v1.7.0
Downloaded clap v3.2.25
Downloaded chrono v0.4.26
Downloaded syn v1.0.109
Downloaded nix v0.26.2
Downloaded rustix v0.38.8
Downloaded regex-automata v0.3.6
Downloaded rustix v0.37.23
Downloaded regex-syntax v0.7.4
Downloaded syn v2.0.29
Downloaded nix v0.24.3
Downloaded regex v1.9.3
Downloaded io-lifetimes v1.0.11
Downloaded 100 crates (7.1 MB) in 1.49s
Compiling libc v0.2.147
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling proc-macro2 v1.0.66
Compiling unicode-ident v1.0.11
Compiling crossbeam-utils v0.8.16
Compiling syn v1.0.109
Compiling once_cell v1.18.0
Compiling scopeguard v1.2.0
Compiling fnv v1.0.7
Compiling memchr v2.5.0
Compiling bitflags v1.3.2
Compiling rayon-core v1.11.0
Compiling ident_case v1.0.1
Compiling strsim v0.10.0
Compiling either v1.9.0
Compiling version_check v0.9.4
Compiling rustix v0.38.8
Compiling regex-syntax v0.7.4
Compiling thiserror v1.0.47
Compiling io-lifetimes v1.0.11
Compiling lazy_static v1.4.0
Compiling memoffset v0.9.0
Compiling crossbeam-epoch v0.9.15
Compiling num-traits v0.2.16
Compiling ahash v0.8.3
Compiling indexmap v1.9.3
Compiling bitflags v2.4.0
Compiling crossbeam-channel v0.5.8
Compiling aho-corasick v1.0.4
Compiling quote v1.0.33
Compiling num_cpus v1.16.0
Compiling errno v0.3.2
Compiling crossbeam-deque v0.8.3
Compiling dirs-sys-next v0.1.2
Compiling syn v2.0.29
Compiling dirs-next v2.0.0
Compiling os_str_bytes v6.5.1
Compiling rayon v1.7.0
Compiling termcolor v1.2.0
Compiling itoa v1.0.9
Compiling regex-automata v0.3.6
Compiling log v0.4.20
Compiling iana-time-zone v0.1.57
Compiling portable-atomic v1.4.2
Compiling hashbrown v0.12.3
Compiling rustix v0.37.23
Compiling serde v1.0.171
Compiling chrono v0.4.26
Compiling clap_lex v0.2.4
Compiling is-terminal v0.4.9
Compiling term v0.7.0
Compiling vte_generate_state_changes v0.1.1
Compiling nix v0.24.3
Compiling atty v0.2.14
Compiling darling_core v0.14.4
Compiling thread_local v1.1.7
Compiling thiserror-impl v1.0.47
Compiling hashbrown v0.14.0
Compiling regex v1.9.3
Compiling static_assertions v1.1.0
Compiling deranged v0.3.8
Compiling unicode-width v0.1.10
Compiling time-core v0.1.1
Compiling utf8parse v0.2.1
Compiling equivalent v1.0.1
Compiling num_threads v0.1.6
Compiling textwrap v0.16.0
Compiling serde_json v1.0.105
Compiling humantime v2.1.0
Compiling time v0.3.26
Compiling env_logger v0.10.0
Compiling clap v3.2.25
Compiling indexmap v2.0.0
Compiling darling_macro v0.14.4
Compiling vte v0.11.1
Compiling tuikit v0.5.0
Compiling partition-identity v0.3.0
Compiling nix v0.26.2
Compiling darling v0.14.4
Compiling derive_builder_core v0.12.0
Compiling fuzzy-muff v0.3.10
Compiling timer v0.2.0 (https://github.com/kimono-koans/timer.rs#4ba32a90)
Compiling derive_builder_macro v0.12.0
Compiling derive_builder v0.12.0
Compiling defer-drop v1.3.0
Compiling console v0.15.7
Compiling nu-ansi-term v0.47.0
Compiling number_prefix v0.4.0
Compiling ryu v1.0.15
Compiling shlex v1.1.0
Compiling two_percent v0.10.19
Compiling indicatif v0.17.6
Compiling lscolors v0.14.0
Compiling terminal_size v0.2.6
Compiling proc-mounts v0.3.0
Compiling which v4.4.0
Compiling xattr v1.0.1
error[E0432]: unresolved import `crate::sys::ENOATTR`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/util.rs:13:5
|
13 | use crate::sys::ENOATTR;
| ^^^^^^^^^^^^^^^^^^^ no `ENOATTR` in `sys`
error[E0432]: unresolved import `sys::XAttrs`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:40:15
|
40 | pub use sys::{XAttrs, SUPPORTED_PLATFORM};
| ^^^^^^ no `XAttrs` in `sys`
error[E0425]: cannot find function `get_path` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:48:31
|
48 | util::extract_noattr(sys::get_path(path.as_ref(), name.as_ref()))
| ^^^^^^^^ not found in `sys`
error[E0425]: cannot find function `set_path` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:57:10
|
57 | sys::set_path(path.as_ref(), name.as_ref(), value)
| ^^^^^^^^ not found in `sys`
error[E0425]: cannot find function `remove_path` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:66:10
|
66 | sys::remove_path(path.as_ref(), name.as_ref())
| ^^^^^^^^^^^ not found in `sys`
error[E0425]: cannot find function `list_path` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:77:10
|
77 | sys::list_path(path.as_ref())
| ^^^^^^^^^ not found in `sys`
error[E0425]: cannot find function `get_fd` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:87:35
|
87 | util::extract_noattr(sys::get_fd(self.as_raw_fd(), name.as_ref()))
| ^^^^^^ not found in `sys`
error[E0425]: cannot find function `set_fd` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:95:14
|
95 | sys::set_fd(self.as_raw_fd(), name.as_ref(), value)
| ^^^^^^ not found in `sys`
error[E0425]: cannot find function `remove_fd` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:103:14
|
103 | sys::remove_fd(self.as_raw_fd(), name.as_ref())
| ^^^^^^^^^ not found in `sys`
error[E0425]: cannot find function `list_fd` in module `sys`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xattr-1.0.1/src/lib.rs:111:14
|
111 | sys::list_fd(self.as_raw_fd())
| ^^^^^^^ not found in `sys`
Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `xattr` (lib) due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `httm v0.30.0 (https://github.com/kimono-koans/httm.git?tag=0.30.0#2e60aceb)`, intermediate artifacts can be found at `/tmp/cargo-install7TrNz1`
Additional context Add any other context about the problem here. Perhaps you should include system details like:
- OS: OmniOS bloody
- Relevant filesystem/s: n/a
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 24 (13 by maintainers)
FYI, the nascent illumos support has been merged into the
masterbranch.Unfortunately, as described, this does not include working via
sshsession, but anyone looking to track down this bug shouldn’t have to use an old feature branch.This also includes parsing of mounts from
/etc/mnttabfor illumos as suggested by @jclulow.Took a stab at flipping some nobs yesterday which don’t appear to be the problem. It’s probably something along the lines of what @jclulow described:
tuikitsetting raw mode in way that illumos doesn’t care for. I just: 1) don’t have the illumos background to know why this fails in an illumossshsession, but works on FreeBSD and Linux and from an illumos VM console, and 2) working with emulated illumos on a Mac Silicon system is a pain.Thanks and happy hunting to anyone who is interested in tracking this down. Pleased to assist.
At a first glance this is a bit odd:
It’s a bit odd that it’s using select() in 2023… Not that it shouldn’t work, it just makes me wonder what other unusual decisions have been made about handling the tty. In particular, if there is some bespoke code to enable raw mode or otherwise configure the tty that isn’t quite right it could definitely result in the hang you’re seeing. I guess tuikit is where I would look next!
I’m pretty busy so it’s going to take me a little while to get to it myself but I am happy to answer questions in the meantime if someone else takes a look!
@jclulow the pstack
@jclulow I do not, I will grab that tomorrow afterwork.
FWIW, I do not believe it is a good idea to parse the output of
mountwithout arguments; it’s meant for people to read rather than programs to parse.As described in the mount(8) manual page, you could use
mount -pwhich would emit records in the stable, parseable format of vfstab(5). What I would probably do, though, is: just open and read the magic file/etc/mnttab, as described in mnttab(5), which contains a live list of currently mounted file systems in a stable parseable format.On the subject of interactive mode:
@sjorge Do you have the output of
pstackfor a process in this stuck state? Most Rust programs have more than one thread, so while some threads are making yield calls, perhaps there is one stuck for some reason on terminal I/O?Yes, terminfo is part of the base install and lives in
/usr/share/terminfobut exporting the TERMINFO env var doesn’t seem to help.Based on the truss output it does seem to load the right data:
Edit: with or without TERMINFO env set explicitly
Yep, path and dataset/fstype/… is swapped compared to freebsd/linux.
Now it just seems to hang and Ctrl-C does not stop it, SIGKILL does stop it eventually. But it seems to leave the ssh session stuck and when doing it over serial console it just makes it unsuable.
It at least does seem to open the correct .zfs/snapshot dir before spewing yield() calls until killed.
Edit: not using interactive mode seems to work though, I’m guessing it somehow has issues drawing the TUI.
Same error, but looking at it with truss I see different behavior now, so some progress!
It seems to be trying to stat in
data/shares/documentswhich is the dataset nameI got a host I can easily try builds on so I can at least do that, I tried your branch (using:
cargo install --git https://github.com/kimono-koans/httm.git --branch "illumos_support")It gives the following errors:
Which seems to be the same error? So maybe the
--branchflag did not do what I think it does?two_percent on the otherhand seems to build just fine.