pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/57708: rust problem when building firefox



>Number:         57708
>Category:       pkg
>Synopsis:       rust problem when building firefox
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 19 20:30:00 +0000 2023
>Originator:     Havard Eidnes
>Release:        NetBSD 10.0_BETA
>Organization:
	I try...
>Environment:
System: NetBSD smistad.uninett.no 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Fri Aug 18 12:52:31 UTC 2023 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

	Ref. the mail thread at tech-pkg, under the subject "rust
	problem when building firefox", starting at

https://mail-index.netbsd.org/tech-pkg/2023/11/16/msg028449.html

	Thomas Klausner is reporting that rust *somtetimes* (not fully
	reproducible) fails when building firefox as part of a bulk
	build, and when it fails, it dumps a rust stack trace, like
	so:

   0:          0x19147a8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc7af7c8c491f235f
   1:          0x195895c - core::fmt::write::h6704aa23384ebf6d
   2:          0x191770e - std::io::Write::write_fmt::h1ec88ed87f1a548f
   3:          0x1914536 - std::sys_common::backtrace::print::h439fad3f83fbc4b5
   4:          0x19346e3 - std::panicking::default_hook::{{closure}}::h1c39ed34efd31c8a
   5:          0x1934368 - std::panicking::default_hook::h4ee60615d1c92b96
   6:          0x193596c - std::panicking::rust_panic_with_hook::hec2f115bd3abe8a5
   7:          0x1914fb7 - std::panicking::begin_panic_handler::{{closure}}::h92a702d96e469894
   8:          0x1914c46 - std::sys_common::backtrace::__rust_end_short_backtrace::h4f5ab40c7a48f822
   9:          0x19354d2 - rust_begin_unwind
  10:           0xc71343 - core::panicking::panic_fmt::h0a6a30a68313052a
  11:          0x193d620 - std::sys::unix::thread::guard::init::h5287555ac329da10
  12:          0x190a3b9 - std::rt::init::h6e67e26812f912e8
  13:          0x190a52b - std::rt::lang_start_internal::h927544304a5690c7
  14:           0xcf2cd5 - main
  15:           0xbf637d - ___start
                               at /usr/src/lib/csu/common/crt0-common.c:350:2
fatal runtime error: initialization or cleanup bug

	Reportedly, this does not happen every time, but with a
	certain regularity.

The panick points to this function:

https://doc.rust-lang.org/src/std/sys/unix/thread.rs.html#835-914

This code has conditionals for FreeBSD and OpenBSD, but NetBSD is not
described / implemented.  The "Guard" Option is apparently used
elsewhere, such as in

https://github.com/rust-lang/rust/blob/master/library/std/src/sys_common/thread_info.rs

though grep'ing for "Guard" in the rust source code reveals several
other matches.


>How-To-Repeat:
	Repeatedly build firefox, and watch it fail with some
	regularity.

>Fix:
	Implement the init part for NetBSD.  Hopefully all our ports
	have the same behaviour in this aspect(?)



Home | Main Index | Thread Index | Old Index