metal-stack / metal-hammer

metal-hammer is used to boot bare metal servers with ipxe and the metal-stack kernel
GNU Affero General Public License v3.0
41 stars 6 forks source link

Nil pointer dereference #114

Closed robertvolkmann closed 7 months ago

robertvolkmann commented 9 months ago
      metal-hammer             .
                               |\
    .--------------.___________) \ 
    |//////////////|___________[ ] 
    '--------------'           ) ( 
            by metal-stack.io  '-'

2000-01-01T17:49:39.568Z    debug   connect {"vendor": "Vendor:Supermicro Model:X11SDD-8C-F"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "BMC ARP Control", "value": "ARP Responses Enabled, Gratuitous ARP Disabled"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "RMCP+ Cipher Suites", "value": "1,2,3,6,7,8,11,12"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Bad Password Threshold", "value": "3"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Invalid password disable", "value": "yes"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "MAC Address", "value": "3c:ec:ef:da:b1:77"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "802.1q VLAN Priority", "value": "0"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Attempt Count Reset Int.", "value": "300"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Cipher Suite Priv Max", "value": "XaaaXXaaaXXaaXX"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "User Lockout Interval", "value": "300"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "IP Address Source", "value": "DHCP Address"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Subnet Mask", "value": "255.255.255.0"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "IP Header", "value": "TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Default Gateway IP", "value": "10.140.11.1"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Backup Gateway MAC", "value": "00:00:00:00:00:00"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "802.1q VLAN ID", "value": "Disabled"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Backup Gateway IP", "value": "0.0.0.0"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Set in Progress", "value": "Set Complete"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Auth Type Support", "value": "NONE MD2 MD5 PASSWORD"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Auth Type Enable", "value": "Callback : MD2 MD5 PASSWORD"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "IP Address", "value": "10.140.11.17"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "SNMP Community String", "value": "public"}
2000-01-01T17:49:39.674Z    debug   output  {"key": "Default Gateway MAC", "value": "00:00:00:00:00:00"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Product Serial", "value": "E340538X3901084A"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "FRU Device Description", "value": "Builtin FRU Device (ID 0)"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Chassis Part Number", "value": "CSE-938NH-R1K68BP"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Board Mfg Date", "value": "Mon Nov 21 13:50:00 2022"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Board Part Number", "value": "X11SDD-8C-F"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Board Serial", "value": "WM22BS014604"}
2000-01-01T17:49:39.949Z    debug   output  {"key": "Product Manufacturer", "value": "Supermicro"}
2000-01-01T17:49:39.950Z    debug   output  {"key": "Product Part Number", "value": "SYS-5039MD8-H8TNR"}
2000-01-01T17:49:39.950Z    debug   output  {"key": "Chassis Type", "value": "Other"}
2000-01-01T17:49:39.950Z    debug   output  {"key": "Chassis Serial", "value": "C9380AK34PA0111"}
2000-01-01T17:49:39.950Z    debug   output  {"key": "Board Mfg", "value": "Supermicro"}
2000-01-01T17:49:39.950Z    debug   output  {"key": "Board Product", "value": "X11SDD-8C-F"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Aux Firmware Rev Info", "value": ""}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Manufacturer ID", "value": "10876"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Product Name", "value": "Unknown (0x1B1C)"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Firmware Revision", "value": "3.75"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "IPMI Version", "value": "2.0"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Manufacturer Name", "value": "Supermicro"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Product ID", "value": "6940 (0x1b1c)"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Device Available", "value": "yes"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Provides Device SDRs", "value": "no"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Device ID", "value": "32"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Device Revision", "value": "1"}
2000-01-01T17:49:39.983Z    debug   output  {"key": "Additional Device Support", "value": ""}
2000-01-01T17:49:39.986Z    info    sshd started, connect via ssh -i metal.key root@10.140.112.17
2000-01-01T17:49:39.987Z    info    metal-hammer    {"version": "v0.11.6 (c9d5d171), tags/v0.11.6-0-gc9d5d17, 2023-11-16T08:00:01Z, go1.20.5", "hal": "InBand connected to Supermicro"}
2000-01-01T17:49:39.987Z    info    configuration   {"debug": true, "pixieAPIUrl": "http://10.140.112.1:4242/certs", "bgpenabled": false, "cidr": "", "machineUUID": "6432f400-69a3-11ed-8000-3cecefc0fd0c", "ip": "10.140.112.17"}
2000-01-01T17:49:39.988Z    info    metal-hammer run    {"firmware": "efi", "bios": "version:1.4a vendor:American Megatrends Inc. date:07/17/2023"}
2000-01-01T17:49:54.996Z    error   failed to fetch GRPC certificates   {"error": "context dea[   75.900769] watchdog: watchdog0: watchdog did not stop!
dline exceeded"}
2000-01-01T17:49:54.996Z    error   metal-hammer failed {"rebooting in": 5, "error": "context deadline exceeded"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x94cda5]

goroutine 1 [running]:
github.com/metal-stack/metal-hammer/cmd/event.(*EventEmitter).Emit(0x0, {0x100de53, 0x7}, {0xc000694920, 0x19})
    /work/cmd/event/event.go:56 +0x65
main.main()
    /work/main.go:70 +0x6ec
majst01 commented 8 months ago

Fixed with https://github.com/metal-stack/metal-hammer/pull/115/commits/f1009b8ea17f8a7ce2e1d3d2cf154ac9530e29f5 and can be closed once https://github.com/metal-stack/metal-hammer/pull/115 is merged

Gerrit91 commented 7 months ago

I guess this can be closed now.