Skip to content

SIGSEGV on linux amd64 #4464

@lczyk

Description

@lczyk

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

fzf_0.44.1-1ubuntu0.3_amd64.deb

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

docker run -it --rm --platform linux/amd64 ubuntu:24.04 bash -c "apt update && apt install fzf && fzf"

output:

Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1128 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1820 kB]
Get:7 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [23.0 kB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1270 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]
Get:10 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1808 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [45.2 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1443 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1608 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [1942 kB]
Get:17 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [33.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [48.8 kB]
Fetched 31.6 MB in 6s (5480 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  fzf
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 1334 kB of archives.
After this operation, 3828 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 fzf amd64 0.44.1-1ubuntu0.3 [1334 kB]
Fetched 1334 kB in 1s (1551 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package fzf.
(Reading database ... 4381 files and directories currently installed.)
Preparing to unpack .../fzf_0.44.1-1ubuntu0.3_amd64.deb ...
Unpacking fzf (0.44.1-1ubuntu0.3) ...
Setting up fzf (0.44.1-1ubuntu0.3) ...
SIGSEGV: segmentation violation
PC=0x436805 m=3 sigcode=1 addr=0xffffffff3519b6b0

goroutine 0 gp=0xc000006fc0 m=3 mp=0xc00004f008 [idle]:
runtime.netpoll(0xc000026000?)
	runtime/netpoll_epoll.go:166 +0x245 fp=0xffff37afdc30 sp=0xffff37afd5a0 pc=0x436805
runtime.findRunnable()
	runtime/proc.go:3470 +0x8c5 fp=0xffff37afdda8 sp=0xffff37afdc30 pc=0x442be5
runtime.schedule()
	runtime/proc.go:3868 +0xb1 fp=0xffff37afdde0 sp=0xffff37afdda8 pc=0x444151
runtime.park_m(0xc000082380)
	runtime/proc.go:4036 +0x1ec fp=0xffff37afde38 sp=0xffff37afdde0 pc=0x44472c
runtime.mcall()
	runtime/asm_amd64.s:458 +0x4e fp=0xffff37afde50 sp=0xffff37afde38 pc=0x46cb2e

goroutine 1 gp=0xc0000061c0 m=nil [runnable]:
type:.hash.github.com/junegunn/fzf/src/tui.Event(0xc00011b000, 0x3a7b28c9?)
	<autogenerated>:1 +0x4b fp=0xc000113010 sp=0xc000113008 pc=0x58942b
runtime.evacuate(0x5a7cc0, 0xc0001089c0, 0x412b3c?)
	runtime/map.go:1207 +0x245 fp=0xc0001130c8 sp=0xc000113010 pc=0x4134a5
runtime.growWork(0x5a7cc0, 0xc0001089c0, 0xc000158b78?)
	runtime/map.go:1147 +0x5f fp=0xc0001130f0 sp=0xc0001130c8 pc=0x41321f
runtime.mapassign(0x5a7cc0, 0xc0001089c0, 0xc000113400)
	runtime/map.go:611 +0x13c fp=0xc000113170 sp=0xc0001130f0 pc=0x411e7c
github.com/junegunn/fzf/src.NewTerminal(0xc00011a708, 0xc000126588)
	github.com/junegunn/fzf/src/terminal.go:649 +0x63e fp=0xc000113b20 sp=0xc000113170 pc=0x56e27e
github.com/junegunn/fzf/src.Run(0xc00011a708, {0x5d8371?, 0x724ac8?}, {0x5d8377?, 0xc0000061c0?})
	github.com/junegunn/fzf/src/core.go:198 +0xe70 fp=0xc000113f18 sp=0xc000113b20 pc=0x5451f0
main.main()
	github.com/junegunn/fzf/main.go:13 +0x34 fp=0xc000113f50 sp=0xc000113f18 pc=0x589754
runtime.main()
	runtime/proc.go:271 +0x29d fp=0xc000113fe0 sp=0xc000113f50 pc=0x43ca3d
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc000113fe8 sp=0xc000113fe0 pc=0x46eb61

goroutine 2 gp=0xc000006c40 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:402 +0xce fp=0xc000048fa8 sp=0xc000048f88 pc=0x43ce6e
runtime.goparkunlock(...)
	runtime/proc.go:408
runtime.forcegchelper()
	runtime/proc.go:326 +0xb3 fp=0xc000048fe0 sp=0xc000048fa8 pc=0x43ccf3
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc000048fe8 sp=0xc000048fe0 pc=0x46eb61
created by runtime.init.6 in goroutine 1
	runtime/proc.go:314 +0x1a

goroutine 18 gp=0xc000082380 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:402 +0xce fp=0xc000044780 sp=0xc000044760 pc=0x43ce6e
runtime.goparkunlock(...)
	runtime/proc.go:408
runtime.bgsweep(0xc00008e000)
	runtime/mgcsweep.go:278 +0x94 fp=0xc0000447c8 sp=0xc000044780 pc=0x428614
runtime.gcenable.gowrap1()
	runtime/mgc.go:203 +0x25 fp=0xc0000447e0 sp=0xc0000447c8 pc=0x41d165
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc0000447e8 sp=0xc0000447e0 pc=0x46eb61
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:203 +0x66

goroutine 19 gp=0xc000082540 m=nil [GC scavenge wait]:
runtime.gopark(0xc00008e000?, 0x618b98?, 0x1?, 0x0?, 0xc000082540?)
	runtime/proc.go:402 +0xce fp=0xc000044f78 sp=0xc000044f58 pc=0x43ce6e
runtime.goparkunlock(...)
	runtime/proc.go:408
runtime.(*scavengerState).park(0x787fe0)
	runtime/mgcscavenge.go:425 +0x49 fp=0xc000044fa8 sp=0xc000044f78 pc=0x426009
runtime.bgscavenge(0xc00008e000)
	runtime/mgcscavenge.go:653 +0x3c fp=0xc000044fc8 sp=0xc000044fa8 pc=0x42659c
runtime.gcenable.gowrap2()
	runtime/mgc.go:204 +0x25 fp=0xc000044fe0 sp=0xc000044fc8 pc=0x41d105
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc000044fe8 sp=0xc000044fe0 pc=0x46eb61
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:204 +0xa5

goroutine 20 gp=0xc000082e00 m=nil [finalizer wait]:
runtime.gopark(0xc000048648?, 0x410845?, 0xa8?, 0x1?, 0xc0000061c0?)
	runtime/proc.go:402 +0xce fp=0xc000048620 sp=0xc000048600 pc=0x43ce6e
runtime.runfinq()
	runtime/mfinal.go:194 +0x107 fp=0xc0000487e0 sp=0xc000048620 pc=0x41c1a7
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc0000487e8 sp=0xc0000487e0 pc=0x46eb61
created by runtime.createfing in goroutine 1
	runtime/mfinal.go:164 +0x3d

goroutine 34 gp=0xc00016c000 m=nil [runnable]:
runtime.asyncPreempt2()
	runtime/preempt.go:307 +0x39 fp=0xc000059aa0 sp=0xc000059a80 pc=0x43b599
runtime.asyncPreempt()
	runtime/preempt_amd64.s:53 +0xdb fp=0xc000059c28 sp=0xc000059aa0 pc=0x4700bb
path/filepath.Clean({0xc0000d6000, 0x14})
	path/filepath/path.go:103 +0xb3 fp=0xc000059d00 sp=0xc000059c28 pc=0x4e8eb3
path/filepath.join({0xc000059da0?, 0x3c?, 0x618cb8?})
	path/filepath/path_unix.go:49 +0x65 fp=0xc000059d38 sp=0xc000059d00 pc=0x4e9b25
path/filepath.Join(...)
	path/filepath/path.go:264
os/exec.LookPath({0x5d7fbd, 0x4})
	os/exec/lp_unix.go:70 +0x1c5 fp=0xc000059dd0 sp=0xc000059d38 pc=0x4edf25
os/exec.Command({0x5d7fbd, 0x4}, {0xc0001726b0, 0x2, 0x13?})
	os/exec/exec.go:419 +0x205 fp=0xc000059e60 sp=0xc000059dd0 pc=0x4e9f65
github.com/junegunn/fzf/src/util.ExecCommandWith(...)
	github.com/junegunn/fzf/src/util/util_unix.go:24
github.com/junegunn/fzf/src.(*Reader).readFromCommand(0xc000106440, 0xc000172720, {0x5e4f13, 0xd2})
	github.com/junegunn/fzf/src/reader.go:195 +0x13c fp=0xc000059ee8 sp=0xc000059e60 pc=0x566b9c
github.com/junegunn/fzf/src.(*Reader).ReadSource(0xc000106440)
	github.com/junegunn/fzf/src/reader.go:116 +0x21e fp=0xc000059fc8 sp=0xc000059ee8 pc=0x56641e
github.com/junegunn/fzf/src.Run.gowrap1()
	github.com/junegunn/fzf/src/core.go:120 +0x25 fp=0xc000059fe0 sp=0xc000059fc8 pc=0x546ce5
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc000059fe8 sp=0xc000059fe0 pc=0x46eb61
created by github.com/junegunn/fzf/src.Run in goroutine 1
	github.com/junegunn/fzf/src/core.go:120 +0x76d

goroutine 35 gp=0xc00016c1c0 m=nil [sync.Cond.Wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:402 +0xce fp=0xc000172e68 sp=0xc000172e48 pc=0x43ce6e
runtime.goparkunlock(...)
	runtime/proc.go:408
sync.runtime_notifyListWait(0xc000106490, 0x0)
	runtime/sema.go:569 +0x159 fp=0xc000172eb8 sp=0xc000172e68 pc=0x46b499
sync.(*Cond).Wait(0x0?)
	sync/cond.go:70 +0x85 fp=0xc000172ef8 sp=0xc000172eb8 pc=0x47e6e5
github.com/junegunn/fzf/src/util.(*EventBox).Wait(0xc0001265d0, 0xc000172fa8)
	github.com/junegunn/fzf/src/util/eventbox.go:31 +0x51 fp=0xc000172f10 sp=0xc000172ef8 pc=0x4eef91
github.com/junegunn/fzf/src.(*Matcher).Loop(0xc00010a410)
	github.com/junegunn/fzf/src/matcher.go:63 +0x85 fp=0xc000172fc8 sp=0xc000172f10 pc=0x5481a5
github.com/junegunn/fzf/src.Run.gowrap2()
	github.com/junegunn/fzf/src/core.go:195 +0x25 fp=0xc000172fe0 sp=0xc000172fc8 pc=0x546a65
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc000172fe8 sp=0xc000172fe0 pc=0x46eb61
created by github.com/junegunn/fzf/src.Run in goroutine 1
	github.com/junegunn/fzf/src/core.go:195 +0xe5b

goroutine 21 gp=0xc000082fc0 m=nil [sleep]:
runtime.gopark(0x238dca25a111?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:402 +0xce fp=0xc000045760 sp=0xc000045740 pc=0x43ce6e
time.Sleep(0xe4e1c0)
	runtime/time.go:195 +0x115 fp=0xc0000457a0 sp=0xc000045760 pc=0x46bb75
github.com/junegunn/fzf/src.(*Reader).startEventPoller.func1()
	github.com/junegunn/fzf/src/reader.go:57 +0x31 fp=0xc0000457e0 sp=0xc0000457a0 pc=0x565eb1
runtime.goexit({})
	runtime/asm_amd64.s:1695 +0x1 fp=0xc0000457e8 sp=0xc0000457e0 pc=0x46eb61
created by github.com/junegunn/fzf/src.(*Reader).startEventPoller in goroutine 34
	github.com/junegunn/fzf/src/reader.go:39 +0x4f

rax    0x1
rbx    0x0
rcx    0x0
rdx    0xad5581
rdi    0x7e7aa0
rsi    0xffffffff3519b6a0
rbp    0xffff37afdc20
rsp    0xffff37afd5a0
r8     0x77
r9     0x72
r10    0x1
r11    0x0
r12    0xffff37afd620
r13    0x1
r14    0xc000006fc0
r15    0xb
rip    0x436805
rflags 0x202
cs     0x33
fs     0x0
gs     0x0

... && fzf --version prints 0.44.1 (debian) as expected though.

possibly related, or, indeed, the same as #4350, but i was not sure sure due to no straightforward reproduction of the other issue, hence made a new one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions