Git Product home page Git Product logo

Comments (7)

hugelgupf avatar hugelgupf commented on June 9, 2024

That’s a cool bug.

Can you add -v (just -v) to the kernel cmdline args? It’ll make the init process not quiet the kernel prints once userland is started and we can see if there’s something interesting happening during that crash.

from u-root.

HashFail avatar HashFail commented on June 9, 2024

@hugelgupf thanks for the response! I now see the following additional output:

2024/02/29 20:35:28 Welcome to u-root!
                              _
   _   _      _ __ ___   ___ | |_
  | | | |____| '__/ _ \ / _ \| __|
  | |_| |____| | | (_) | (_) | |_
   \__,_|    |_|  \___/ \___/ \__|

u-root init: error creating mount -t "securityfs" -o  "securityfs" "/sys/kernel/security" flags 0x0: no such file or directory
u-root init: error creating mount -t "securityfs" -o  "securityfs" "/sys/kernel/security" flags 0x0: no such file or directory
u-root init [optional]: warning creating mount -t "tmpfs" -o  "cgroup" "/sys/fs/cgroup" flags 0x0: no such file or directory
u-root init [optional]: warning creating mount -t "tmpfs" -o  "cgroup" "/sys/fs/cgroup" flags 0x0: no such file or directory
usb 2-3: new high-speed USB device number 2 using xhci_hcd
usb 2-3: new high-speed USB device number 2 using xhci_hcd
u-root init [optional]: warning creating dir "/sys/fs/cgroup/memory" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/memory" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/freezer" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/freezer" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/devices" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/devices" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/cpu,cpuacct" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/cpu,cpuacct" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/blkio" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/blkio" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/cpuset" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/cpuset" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/pids" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/pids" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
usb 2-3: New USB device found, idVendor=0424, idProduct=2660, bcdDevice= 8.01
usb 2-3: New USB device found, idVendor=0424, idProduct=2660, bcdDevice= 8.01
u-root init [optional]: warning creating dir "/sys/fs/cgroup/net_cls,net_prio" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
u-root init [optional]: warning creating dir "/sys/fs/cgroup/net_cls,net_prio" (mode 0555): mkdir /sys/fs/cgroup: operation not permitted
usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
init: 2024/02/29hub 2-3:1.0: USB hub found
hub 2-3:1.0: USB hub found
hub 2-3:1.0: 2 ports detected
hub 2-3:1.0: 2 ports detected
 20:35:28 stat /inito: no such file or directory
init: 2024/02/29 20:35:28 stat /bbin/uinit: no such file or directory
init: 2024/02/29 20:35:28 Trying to run /bin/uinit
usb 3-4: new SuperSpeed USB device number 2 using xhci_hcd
usb 3-4: new SuperSpeed USB device number 2 using xhci_hcd
usb 3-4: New USB device found, idVendor=0bda, idProduct=0329, bcdDevice=29.08
usb 3-4: New USB device found, idVendor=0bda, idProduct=0329, bcdDevice=29.08
usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-4: Product: USB3.0-CRW
usb 3-4: Product: USB3.0-CRW
usb 3-4: Manufacturer: Generic
usb 3-4: Manufacturer: Generic
usb 3-4: SerialNumber: 29203008282014000
usb 3-4: SerialNumber: 29203008282014000
usb-storage 3-4:1.0: USB Mass Storage device detected
usb-storage 3-4:1.0: USB Mass Storage device detected
scsi host0: usb-storage 3-4:1.0
scsi host0: usb-storage 3-4:1.0
usb 2-6: new low-speed USB device number 3 using xhci_hcd
usb 2-6: new low-speed USB device number 3 using xhci_hcd
usb 2-6: New USB device found, idVendor=1c4f, idProduct=0016, bcdDevice= 1.10
usb 2-6: New USB device found, idVendor=1c4f, idProduct=0016, bcdDevice= 1.10
usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-6: Product: USB Keyboard
usb 2-6: Product: USB Keyboard
usb 2-6: Manufacturer: SIGMACHIP
usb 2-6: Manufacturer: SIGMACHIP
input: SIGMACHIP USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/0003:1C4F:0016.0001/input/input0
input: SIGMACHIP USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/0003:1C4F:0016.0001/input/input0
usb 3-6: new SuperSpeed USB device number 3 using xhci_hcd
usb 3-6: new SuperSpeed USB device number 3 using xhci_hcd
hid-generic 0003:1C4F:0016.0001: input,hidraw0: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-0000:00:14.0-6/input0
hid-generic 0003:1C4F:0016.0001: input,hidraw0: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-0000:00:14.0-6/input0
usb 3-6: New USB device found, idVendor=152d, idProduct=b567, bcdDevice= 2.23
usb 3-6: New USB device found, idVendor=152d, idProduct=b567, bcdDevice= 2.23
usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-6: Product: USB3.0 to SATA adapter
usb 3-6: Product: USB3.0 to SATA adapter
usb 3-6: Manufacturer: JMicron
usb 3-6: Manufacturer: JMicron
usb 3-6: SerialNumber: 0000AB1235BA
usb 3-6: SerialNumber: 0000AB1235BA
input: SIGMACHIP USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.1/0003:1C4F:0016.0002/input/input1
input: SIGMACHIP USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.1/0003:1C4F:0016.0002/input/input1
input: SIGMACHIP USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.1/0003:1C4F:0016.0002/input/input2
input: SIGMACHIP USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.1/0003:1C4F:0016.0002/input/input2
hid-generic 0003:1C4F:0016.0002: input,hidraw1: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-0000:00:14.0-6/input1
hid-generic 0003:1C4F:0016.0002: input,hidraw1: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-0000:00:14.0-6/input1
scsi host1: uas
scsi host1: uas
scsi 1:0:0:0: Direct-Access     T-FORCE  1TB              0223 PQ: 0 ANSI: 6
scsi 1:0:0:0: Direct-Access     T-FORCE  1TB              0223 PQ: 0 ANSI: 6
sd 1:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
sd 1:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
sd 1:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
 sda: sda1 sda2
 sda: sda1 sda2
sd 1:0:0:0: [sda] Attached SCSI disk
sd 1:0:0:0: [sda] Attached SCSI disk
usb 2-13: new low-speed USB device number 4 using xhci_hcd
usb 2-13: new low-speed USB device number 4 using xhci_hcd
usb 2-13: New USB device found, idVendor=040b, idProduct=2000, bcdDevice= 2.05
usb 2-13: New USB device found, idVendor=040b, idProduct=2000, bcdDevice= 2.05
usb 2-13: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-13: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-13: Product: USB Keyboard
usb 2-13: Product: USB Keyboard
usb 2-13: Manufacturer: Generic
usb 2-13: Manufacturer: Generic
input: Generic USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.0/0003:040B:2000.0003/input/input3
input: Generic USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.0/0003:040B:2000.0003/input/input3
hid-generic 0003:040B:2000.0003: input,hidraw2: USB HID v1.10 Keyboard [Generic USB Keyboard] on usb-0000:00:14.0-13/input0
hid-generic 0003:040B:2000.0003: input,hidraw2: USB HID v1.10 Keyboard [Generic USB Keyboard] on usb-0000:00:14.0-13/input0
input: Generic USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input4
input: Generic USB Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input4
input: Generic USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input5
input: Generic USB Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input5
input: Generic USB Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input6
input: Generic USB Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-13/2-13:1.1/0003:040B:2000.0004/input/input6
hid-generic 0003:040B:2000.0004: input,hidraw3: USB HID v1.10 Mouse [Generic USB Keyboard] on usb-0000:00:14.0-13/input1
hid-generic 0003:040B:2000.0004: input,hidraw3: USB HID v1.10 Mouse [Generic USB Keyboard] on usb-0000:00:14.0-13/input1
scsi 0:0:0:0: Direct-Access     Generic- SD/MMC CRW       1.00 PQ: 0 ANSI: 6
scsi 0:0:0:0: Direct-Access     Generic- SD/MMC CRW       1.00 PQ: 0 ANSI: 6
sd 0:0:0:0: [sdb] Media removed, stopped polling
sd 0:0:0:0: [sdb] Media removed, stopped polling
sd 0:0:0:0: [sdb] Attached SCSI removable disk
sd 0:0:0:0: [sdb] Attached SCSI removable disk
2024/02/29 20:36:24 fork/exec /bin/uinit: resource temporarily unavailable
init: 2024/02/29 20:36:31 Shell exited, exit status 1
init: 2024/02/29 20:36:31 stat /buildbin/uinit: no such file or directory
init: 2024/02/29 20:36:31 Trying to run /bin/defaultsh

from u-root.

hugelgupf avatar hugelgupf commented on June 9, 2024

It kinda feels like a fork-bomb. I'll try to repro in a VM test.

from u-root.

hugelgupf avatar hugelgupf commented on June 9, 2024

Definitely a fork bomb, I have a repro https://github.com/hugelgupf/u-root/blob/forkbomb/integration/generic-tests/fork_bomb_test.go (no need to fork bomb your own system when it can be done in a VM).

Looks like it's an issue with how gosh deals with hash-bang invocations, because when I use the equivalent of -uinitcmd="gosh script.sh" it works just fine (which is the workaround you can use for now)

from u-root.

HashFail avatar HashFail commented on June 9, 2024

Thanks a lot friend! That did the trick.

from u-root.

hugelgupf avatar hugelgupf commented on June 9, 2024

I got a draft to fix the hash bang issue but still working on better testing. Keeping this open till I’m able to do that.

from u-root.

HashFail avatar HashFail commented on June 9, 2024

Will do

from u-root.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.