Skip to content

Conversation

garbas
Copy link
Member

@garbas garbas commented Jun 10, 2012

No description provided.

@peti
Copy link
Member

peti commented Jun 11, 2012

Committed in r34445.

@garbas garbas closed this Jun 11, 2012
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Jun 17, 2018
Maybe same problem as on Darwin, unsure.

From gdb:

> Thread 1 (process 23820):
> #0  0x00007ffff7dab684 in __syscall_cp_c () from target:/nix/store/66m5z7marjbs7pa3gv8sf5j1qrqjacfj-musl-1.1.19/lib/ld-musl-x86_64.so.1
> #1  0x00007ffff7daac69 in __timedwait_cp () from target:/nix/store/66m5z7marjbs7pa3gv8sf5j1qrqjacfj-musl-1.1.19/lib/ld-musl-x86_64.so.1
> #2  0x00007ffff7daad17 in __timedwait () from target:/nix/store/66m5z7marjbs7pa3gv8sf5j1qrqjacfj-musl-1.1.19/lib/ld-musl-x86_64.so.1
> #3  0x00007ffff7dacaf4 in pthread_mutex_timedlock () from target:/nix/store/66m5z7marjbs7pa3gv8sf5j1qrqjacfj-musl-1.1.19/lib/ld-musl-x86_64.so.1
> NixOS#4  0x00007ffff781e409 in _gpgrt_lock_lock () from target:/nix/store/f7qid95jabfr665qc1kbcl6adf48gq7w-libgpg-error-1.28/lib/libgpg-error.so.0
> NixOS#5  0x00007ffff7b035d5 in lock_rng () at ./rndjent.c:212
> NixOS#6  0x00007ffff7b036ab in _gcry_rndjent_poll (add=0x0, origin=RANDOM_ORIGIN_INIT, length=0) at ./rndjent.c:268
> NixOS#7  0x00007ffff7b038cf in _gcry_rndjent_get_version (r_active=0x7fffffffc800) at ./rndjent.c:339
> NixOS#8  0x00007ffff7a44f7f in print_config (fp=0x6026e0, what=0x0) at global.c:391
> NixOS#9  _gcry_get_config (mode=mode@entry=0, what=<optimized out>, what@entry=0x0) at global.c:420
> NixOS#10 0x00007ffff7a456a3 in _gcry_vcontrol (cmd=<optimized out>, arg_ptr=<optimized out>) at global.c:652
> NixOS#11 0x00007ffff7a41689 in gcry_control (cmd=cmd@entry=GCRYCTL_PRINT_CONFIG) at visibility.c:79
> NixOS#12 0x0000000000400ec3 in main (argc=<optimized out>, argv=<optimized out>) at version.c:160
matthewbauer added a commit that referenced this pull request Jul 6, 2018
This adds some initial values for .dir-locals.el. Mainly this is
useful for using bug-reference-mode.

So if you have bug-reference-mode enabled -

> M-x bug-reference-mode

You will see as clickable text like this:

  Fixes #15

  (#12)

  Closed #1252

  issue #1
@Valodim Valodim mentioned this pull request Feb 28, 2020
10 tasks
danieldk added a commit to danieldk/nixpkgs that referenced this pull request Apr 10, 2020
Changelog:

- Add heuristics for ambiguous quotation marks (issue NixOS#11).
- Avoid false positives for emoticons that contain a space (issue
  NixOS#12).
- Correctly tokenize obfuscated email addresses that contain spaces.
- Do not split tl;dr and its German variant zl;ng.

https://github.com/tsproisl/SoMaJo/releases/tag/v2.0.5
Profpatsch pushed a commit that referenced this pull request Jun 20, 2020
Thinkpad X220i: configure more hardware
@collares collares mentioned this pull request Dec 2, 2020
10 tasks
ethancedwards8 pushed a commit to ethancedwards8/nixpkgs that referenced this pull request Apr 2, 2021
primeos added a commit to primeos/nixpkgs that referenced this pull request May 27, 2021
FAIL: LLVM :: DebugInfo/X86/vla-multi.ll (25780 of 42068)
******************** TEST 'LLVM :: DebugInfo/X86/vla-multi.ll' FAILED ********************
Script:
--
: 'RUN: at line 1';   /build/llvm/build/bin/llc -mtriple=x86_64-apple-darwin /build/llvm/test/DebugInfo/X86/vla-multi.ll -o - -filetype=obj | /build/llvm/build/bin/llvm-dwarfdump - | /build/llvm/build/bin/FileCheck --allow-unused-prefixes=false /build/llvm/test/DebugInfo/X86/vla-multi.ll
--
Exit Code: 2

Command Output (stderr):
--
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /build/llvm/build/bin/llc -mtriple=x86_64-apple-darwin /build/llvm/test/DebugInfo/X86/vla-multi.ll -o - -filetype=obj
 #0 0x00007ffff286ac1d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/build/llvm/build/lib/libLLVM-12.so+0xd51c1d)
 #1 0x00007ffff2868924 llvm::sys::RunSignalHandlers() (/build/llvm/build/lib/libLLVM-12.so+0xd4f924)
 #2 0x00007ffff2868a9b SignalHandler(int) (/build/llvm/build/lib/libLLVM-12.so+0xd4fa9b)
 #3 0x00007ffff1b0b700 __restore_rt (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libpthread.so.0+0x13700)
 #4 0x00007ffff31c2430 llvm::DIE::getUnitDie() const (/build/llvm/build/lib/libLLVM-12.so+0x16a9430)
 NixOS#5 0x00007ffff31e0f5c llvm::DwarfDebug::finishEntityDefinitions() (/build/llvm/build/lib/libLLVM-12.so+0x16c7f5c)
 NixOS#6 0x00007ffff31f9415 llvm::DwarfDebug::finalizeModuleInfo() (/build/llvm/build/lib/libLLVM-12.so+0x16e0415)
 NixOS#7 0x00007ffff31fc558 llvm::DwarfDebug::endModule() (/build/llvm/build/lib/libLLVM-12.so+0x16e3558)
 NixOS#8 0x00007ffff31ab659 llvm::AsmPrinter::doFinalization(llvm::Module&) (/build/llvm/build/lib/libLLVM-12.so+0x1692659)
 NixOS#9 0x00007ffff29ab77d llvm::FPPassManager::doFinalization(llvm::Module&) (.localalias) (/build/llvm/build/lib/libLLVM-12.so+0xe9277d)
NixOS#10 0x00007ffff29b7570 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/build/llvm/build/lib/libLLVM-12.so+0xe9e570)
NixOS#11 0x0000000000415bbf compileModule(char**, llvm::LLVMContext&) (/build/llvm/build/bin/llc+0x415bbf)
NixOS#12 0x000000000040e582 main (/build/llvm/build/bin/llc+0x40e582)
NixOS#13 0x00007ffff162aded __libc_start_main (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x27ded)
NixOS#14 0x000000000040eb5a _start /build/glibc-2.32/csu/../sysdeps/x86_64/start.S:122:0
error: -: The file was not recognized as a valid object file
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /build/llvm/build/bin/FileCheck --allow-unused-prefixes=false /build/llvm/test/DebugInfo/X86/vla-multi.ll

--

********************
Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Apr 22, 2022
The following error occurs when using `imagemagickBig`:

    $ ./result/bin/identify sample.jp2
    [1]    699089 IOT instruction (core dumped)  ./result/bin/identify sample.jp2

When looking at the call-trace it seems as if certain symbols, e.g.
`opj_malloc` are mixed up:

    NixOS#8  0x00007f78c79ad2f5 in MagickSignalHandler.cold () from /nix/store/bqy80qiw6czqh7vsmmmivwdswp9zzjgl-imagemagick-7.1.0-29/lib/libMagickCore-7.Q16HDRI.so.10
    NixOS#9  <signal handler called>
    NixOS#10 0x00007f78c5a6095f in opj_malloc () from /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9
    NixOS#11 0x00007f78c5a60981 in opj_calloc () from /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9
    NixOS#12 0x00007f78c4f48e24 in opj_create_decompress () from /nix/store/qwalb0kjz1p9c4j48qkk6ql47ds2lnhh-openjpeg-2.4.0/lib/libopenjp2.so.7

The `opj_create_decompress()` is called from the `openjpeg`-integration
of `imagemagick` and thus shouldn't affect `ghostscript` at all.
However, `ghostscript` (`libgs.so` to be precise) also exposes e.g.
`opj_malloc`:

    $ objdump -t /nix/store/wg6ly83k1k1fjiygiv1jr7li3p6dwsvq-ghostscript-with-X-9.55.0/lib/libgs.so.9.55|grep opj_malloc
    0000000000205940 g     F .text	000000000000002b              opj_malloc

Because of that, two incompatible symbols are used in the same process
and thus the `identify`-call breaks because the wrong one is used. To
work around that I decided to use the system-wide openjpeg instead.
I'm not sure why `libgs.so` wants to expose these symbols anyways, but
with that workaround the problem is solved.

Even though it's mentioned that ghostscript's openjpeg is heavily
patched, I think that this is somewhat outdated or at least irrelevant
considering that both ArchLinux[1] and Fedora[2] use the system-wide
`openjpeg` instead.

[1] https://github.com/archlinux/svntogit-packages/blob/bafcb5473b59d5386dd110d1cb249372dce9ea6c/trunk/PKGBUILD#L50
[2] https://src.fedoraproject.org/rpms/ghostscript/blob/e4eec13ab6ace2bad64b740d352964bbf61d1aa7/f/ghostscript.spec#_245
nat-418 added a commit to nat-418/nixpkgs that referenced this pull request Jul 8, 2023
j-openmesh referenced this pull request in Openmesh-Network/Xnodepkgs Jul 7, 2024
…oot-opnm-sh-upload-failure

Context names must be used instead of envrionment variables as that's what's expected by the GitHub Workflow Schema
CodeRadu pushed a commit to CodeRadu/nixpkgs that referenced this pull request Feb 25, 2025
arianvp added a commit that referenced this pull request Apr 1, 2025
fluent-bit 3.2.7, 3.2.8 and 3.2.9 are segfaulting when
used in combination with the systemd input. Lets
revert to 3.2.6 for now.

Upstream bug: fluent/fluent-bit#10139

Note that fluent-bit-3.2.7 fixes two high CVEs which we are now
reintroducing. However they are only exploitable if you are
using the OpenTelemetry input or the Prometheus Remote Write input.

OpenTelemetry input: [CVE-2024-50609](https://nvd.nist.gov/vuln/detail/CVE-2024-50609)
Prometheus Remote Write input: [CVE-2024-50608](https://nvd.nist.gov/vuln/detail/CVE-2024-50608)

The problem is as follows:

3.2.7 started vendoring a copy of `libzstd` in tree and statically
linking against it. Also, the fluent-bit binary exports the symbols
of static libraries it links against.

This is a problem because `libzstd` gets `dlopen()`ed by `libsystemd`
when enumerating the journal (as journal logs are zstd compressed). and `libzstd` in Nixpkgs is built
with `-DZSTD_LEGACY_SUPPORT=0` which causes `struct ZSTD_DCtx` to be 16
bytes smaller than without this flag https://github.com/facebook/zstd/blob/dev/lib/decompress/zstd_decompress_internal.h#L183-L187

`libsystemd` calls [`sym_ZSTD_createDCtx()`](https://github.com/systemd/systemd/blob/1e79a2923364b65fc9f347884dd5b9b2087f6e32/src/basic/compress.c#L480)
which calls the function pointer returned by `dlsym()` which is calling into
the `libzstd` that comes with `nixpkgs` and thus allocates a struct that is 16 bytes smaller.

Later then `sym_ZSTD_freeDCtx()` is called. However because fluent-bit
has `zstd` in its global symbol table, any functions that `sym_ZSTD_freeDCtx()`
calls will be calls to the functions in the vendored fluent-bit version of the library
which expects the larger struct. This then causes enough heap corruption to cause
a segfault.

E.g. the subsequent calls to `ZSTD_clearDict(dctx)` and `ZSTD_customFree(dctx->inBuff)`
in https://github.com/facebook/zstd/blob/dev/lib/decompress/zstd_decompress.c#L324
will be working on a struct that is 16 bytes smaller than the one that was allocated
by `libsystemd` and will cause a segfault at some point and thus are probably modifying
pieces of memory that they shouldn't

	(gdb) bt
	#0  0x00007f10e7e9916c in __pthread_kill_implementation () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#1  0x00007f10e7e40e86 in raise () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#2  0x00007f10e7e2893a in abort () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#3  0x000000000046a938 in flb_signal_handler ()
	#4  <signal handler called>
	#5  0x00007f10e7ea42b7 in unlink_chunk.isra () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#6  0x00007f10e7ea45cd in _int_free_create_chunk () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#7  0x00007f10e7ea5a1c in _int_free_merge_chunk () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#8  0x00007f10e7ea5dc9 in _int_free () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#9  0x00007f10e7ea8613 in free () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#10 0x00007f10e80ad3b5 in ZSTD_freeDCtx () from /nix/store/wy0slah6yvchgra8nhp6vgrqa6ay72cq-zstd-1.5.6/lib/libzstd.so.1
	#11 0x00007f10e8c90f6b in decompress_blob_zstd () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	#12 0x00007f10e8bf0efe in journal_file_data_payload () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	#13 0x00007f10e8c00f74 in sd_journal_enumerate_data () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	#14 0x00000000004eae2f in in_systemd_collect ()
	#15 0x00000000004eb5a0 in in_systemd_collect_archive ()
	#16 0x000000000047aa18 in flb_input_collector_fd ()
	#17 0x0000000000495223 in flb_engine_start ()
	#18 0x000000000046f304 in flb_lib_worker ()
	#19 0x00007f10e7e972e3 in start_thread () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	#20 0x00007f10e7f1b2fc in __clone3 () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6

Reverts 7310ab3
Reverts 4fbc6cf
Hyphastorm pushed a commit to Hyphastorm/nixpkgs that referenced this pull request Apr 1, 2025
tanya1866 pushed a commit to tanya1866/nixpkgs that referenced this pull request Apr 3, 2025
fluent-bit 3.2.7, 3.2.8 and 3.2.9 are segfaulting when
used in combination with the systemd input. Lets
revert to 3.2.6 for now.

Upstream bug: fluent/fluent-bit#10139

Note that fluent-bit-3.2.7 fixes two high CVEs which we are now
reintroducing. However they are only exploitable if you are
using the OpenTelemetry input or the Prometheus Remote Write input.

OpenTelemetry input: [CVE-2024-50609](https://nvd.nist.gov/vuln/detail/CVE-2024-50609)
Prometheus Remote Write input: [CVE-2024-50608](https://nvd.nist.gov/vuln/detail/CVE-2024-50608)

The problem is as follows:

3.2.7 started vendoring a copy of `libzstd` in tree and statically
linking against it. Also, the fluent-bit binary exports the symbols
of static libraries it links against.

This is a problem because `libzstd` gets `dlopen()`ed by `libsystemd`
when enumerating the journal (as journal logs are zstd compressed). and `libzstd` in Nixpkgs is built
with `-DZSTD_LEGACY_SUPPORT=0` which causes `struct ZSTD_DCtx` to be 16
bytes smaller than without this flag https://github.com/facebook/zstd/blob/dev/lib/decompress/zstd_decompress_internal.h#L183-L187

`libsystemd` calls [`sym_ZSTD_createDCtx()`](https://github.com/systemd/systemd/blob/1e79a2923364b65fc9f347884dd5b9b2087f6e32/src/basic/compress.c#L480)
which calls the function pointer returned by `dlsym()` which is calling into
the `libzstd` that comes with `nixpkgs` and thus allocates a struct that is 16 bytes smaller.

Later then `sym_ZSTD_freeDCtx()` is called. However because fluent-bit
has `zstd` in its global symbol table, any functions that `sym_ZSTD_freeDCtx()`
calls will be calls to the functions in the vendored fluent-bit version of the library
which expects the larger struct. This then causes enough heap corruption to cause
a segfault.

E.g. the subsequent calls to `ZSTD_clearDict(dctx)` and `ZSTD_customFree(dctx->inBuff)`
in https://github.com/facebook/zstd/blob/dev/lib/decompress/zstd_decompress.c#L324
will be working on a struct that is 16 bytes smaller than the one that was allocated
by `libsystemd` and will cause a segfault at some point and thus are probably modifying
pieces of memory that they shouldn't

	(gdb) bt
	#0  0x00007f10e7e9916c in __pthread_kill_implementation () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#1  0x00007f10e7e40e86 in raise () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#2  0x00007f10e7e2893a in abort () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#3  0x000000000046a938 in flb_signal_handler ()
	NixOS#4  <signal handler called>
	NixOS#5  0x00007f10e7ea42b7 in unlink_chunk.isra () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#6  0x00007f10e7ea45cd in _int_free_create_chunk () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#7  0x00007f10e7ea5a1c in _int_free_merge_chunk () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#8  0x00007f10e7ea5dc9 in _int_free () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#9  0x00007f10e7ea8613 in free () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#10 0x00007f10e80ad3b5 in ZSTD_freeDCtx () from /nix/store/wy0slah6yvchgra8nhp6vgrqa6ay72cq-zstd-1.5.6/lib/libzstd.so.1
	NixOS#11 0x00007f10e8c90f6b in decompress_blob_zstd () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	NixOS#12 0x00007f10e8bf0efe in journal_file_data_payload () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	NixOS#13 0x00007f10e8c00f74 in sd_journal_enumerate_data () from /nix/store/b2cfj7yk3wfg1jdwjzim7306hvsc5gnl-systemd-257.3/lib/libsystemd.so.0
	NixOS#14 0x00000000004eae2f in in_systemd_collect ()
	NixOS#15 0x00000000004eb5a0 in in_systemd_collect_archive ()
	NixOS#16 0x000000000047aa18 in flb_input_collector_fd ()
	NixOS#17 0x0000000000495223 in flb_engine_start ()
	NixOS#18 0x000000000046f304 in flb_lib_worker ()
	NixOS#19 0x00007f10e7e972e3 in start_thread () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6
	NixOS#20 0x00007f10e7f1b2fc in __clone3 () from /nix/store/rmy663w9p7xb202rcln4jjzmvivznmz8-glibc-2.40-66/lib/libc.so.6

Reverts 7310ab3
Reverts 4fbc6cf
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

Successfully merging this pull request may close these issues.

2 participants