linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kernel crash on qemu-m68k-system while building r-cran packages
@ 2020-05-27  9:14 John Paul Adrian Glaubitz
  2020-05-27  9:25 ` John Paul Adrian Glaubitz
  2020-05-29 23:49 ` Michael Schmitz
  0 siblings, 2 replies; 8+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-05-27  9:14 UTC (permalink / raw)
  To: linux-m68k; +Cc: Debian m68k, Laurent Vivier

Hi!

I just ran into the following kernel crash - which is reproducible - when trying
to build the R package r-cran-phangorn on qemu-m68k-system on Linux 5.6.7.

Adrian

[   56.640000] *** ADDRESS ERROR ***   FORMAT=2
[   56.640000] Current process id is 728
[   56.640000] BAD KERNEL TRAP: 00000000
[   56.640000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
[   56.640000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
[   56.640000] SR: 2004  SP: 3eb5e68c  a2: c02e239a
[   56.640000] d0: 00000040    d1: 00000002    d2: 8002adec    d3: 8002ad50
[   56.640000] d4: 8002c768    d5: 0000000d    a0: ffffffc2    a1: ffffffc1
[   56.640000] Process R (pid: 728, task=a3dfda5d)
[   56.640000] Frame format=2 instr addr=00000000
[   56.650000] Stack from 3a4d9f30:
[   56.650000]         41000000 00000002 00000002 ffffffc2 ffffffc1 1fff0000 80000000 00000000
[   56.650000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
[   56.650000]         ffffffff 00000000 00050008 00000000 8000067c c02c2000 efffee20 000002d8
[   56.650000]         00002a28 3a4d9f98 00000002 00000014 fffffffe 8002c768 00000002 00000041
[   56.650000]         00000002 c041fc58 c0743758 ffffffff 00000000 0008c075 00002b24 00000012
[   56.650000]         000007d0 00000024 00000002 c05bef04 c05bef04 0000005e 00000077 c28aca70
[   56.650000] Call Trace: [<00050008>] copy_overflow+0x10/0x28
[   56.650000]  [<00002a28>] buserr+0x20/0x28
[   56.650000]  [<0008c075>] bpf_check+0x57f/0x1cfa
[   56.650000]  [<00002b24>] syscall+0x8/0xc
[   56.650000]  [<0000c019>] dn_sched_init+0x75/0x88
[   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
[   56.650000] Disabling lock debugging due to kernel taint
[   56.650000] *** ADDRESS ERROR ***   FORMAT=2
[   56.650000] Current process id is 7
[   56.650000] BAD KERNEL TRAP: 00000000
[   56.650000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
[   56.650000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
[   56.650000] SR: 2704  SP: 5ca00d79  a2: 391686b0
[   56.650000] d0: 00000040    d1: 3dc64d60    d2: 0000000e    d3: 309a6680
[   56.650000] d4: fffffffc    d5: 00000000    a0: 3dc64d60    a1: 391686b0
[   56.650000] Process ksoftirqd/0 (pid: 7, task=018bf318)
[   56.650000] Frame format=2 instr addr=00000000
[   56.650000] Stack from 3dc79e44:
[   56.650000]         41000000 00000000 3dc64d60 3dc64d60 391686b0 1fff0000 80000000 00000000
[   56.650000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
[   56.650000]         ffffffff 00000000 00000000 00000000 00000004 00000004 00000000 00000000
[   56.650000]         0003f400 00000009 003e6ce0 003e6d10 391686dc 003e6ce0 00414bf4 39168641
[   56.650000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2 000489a2 00042114 3dc64d8c
[   56.650000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0 391686dc 003e6ce0 3dc64d8c
[   56.650000] Call Trace: [<0003f400>] arch_local_irq_enable+0x8/0x26
[   56.650000]  [<0004732e>] set_next_entity+0x4c/0xbe
[   56.650000]  [<000472e2>] set_next_entity+0x0/0xbe
[   56.650000]  [<000489a2>] put_prev_entity+0x0/0x68
[   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
[   56.650000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
[   56.650000]  [<002ef606>] __schedule+0x25e/0x39c
[   56.650000]  [<0003f4ca>] kthread_parkme+0x0/0x10
[   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
[   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
[   56.650000]  [<002ef3a8>] __schedule+0x0/0x39c
[   56.650000]  [<0003f450>] kthread_should_stop+0x0/0x12
[   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
[   56.650000]  [<002ef7ae>] schedule+0x6a/0xb2
[   56.650000]  [<002ef744>] schedule+0x0/0xb2
[   56.650000]  [<0003f476>] kthread_should_park+0x0/0xc
[   56.650000]  [<000421b8>] smpboot_thread_fn+0xa4/0x100
[   56.650000]  [<0002df86>] do_exit+0x0/0x720
[   56.650000]  [<0004bd4a>] complete+0x0/0x34
[   56.650000]  [<00040190>] kthread+0xb8/0xc2
[   56.650000]  [<000400d8>] kthread+0x0/0xc2
[   56.650000]  [<00002a74>] ret_from_kernel_thread+0xc/0x14
[   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
[   56.670000] *** ADDRESS ERROR ***   FORMAT=2
[   56.670000] Current process id is 174
[   56.670000] BAD KERNEL TRAP: 00000000
[   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
[   56.670000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
[   56.670000] SR: 2704  SP: 82add07d  a2: 391686b0
[   56.670000] d0: efd57040    d1: 3c534000    d2: 0000000e    d3: 31cb9380
[   56.670000] d4: fffffffc    d5: 00000000    a0: 3c534000    a1: 391686b0
[   56.670000] Process systemd-journal (pid: 174, task=9a58f959)
[   56.670000] Frame format=2 instr addr=00000000
[   56.670000] Stack from 391c9ce4:
[   56.670000]         41000000 efd57054 3c534000 3c534000 391686b0 1fff0000 80000000 00000000
[   56.670000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
[   56.670000]         ffffffff 00000000 04000000 00000000 00000004 00000006 00000000 00000000
[   56.670000]         00000000 00000009 003e6ce0 003e6d10 391686dc 003e6ce0 00414bf4 39168641
[   56.670000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2 000489a2 000657d0 3c53402c
[   56.670000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0 391686dc 003e6ce0 3c53402c
[   56.670000] Call Trace: [<0004732e>] set_next_entity+0x4c/0xbe
[   56.670000]  [<000472e2>] set_next_entity+0x0/0xbe
[   56.670000]  [<000489a2>] put_prev_entity+0x0/0x68
[   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
[   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
[   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
[   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
[   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
[   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
[   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
[   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
[   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
[   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
[   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
[   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
[   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
[   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
[   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
[   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
[   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
[   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
[   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
[   56.670000]  [<00065904>] futex_wait+0x8e/0x150
[   56.670000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
[   56.670000]  [<00066b00>] do_futex+0x94/0x6ee
[   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
[   56.670000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
[   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
[   56.670000]  [<0006737c>] sys_futex_time32+0x106/0x11e
[   56.670000]  [<00002b24>] syscall+0x8/0xc
[   56.670000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
[   56.670000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
[   56.670000] kernel BUG at kernel/sched/core.c:4097!
[   56.670000] *** TRAP #7 ***   FORMAT=0
[   56.670000] Current process id is 174
[   56.670000] BAD KERNEL TRAP: 00000000
[   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
[   56.670000] PC: [<0004518c>] rt_mutex_setprio+0x0/0x1ae
[   56.670000] SR: 2000  SP: 249d2574  a2: 3c534000
[   56.680000] d0: 00000027    d1: 00002000    d2: 391c9c4c    d3: 391c9c4c
[   56.680000] d4: 0002d374    d5: 00000000    a0: 003e7b54    a1: 5000c022
[   56.680000] Process systemd-journal (pid: 174, task=9a58f959)
[   56.680000] Frame format=0
[   56.680000] Stack from 391c9c0c:
[   56.680000]         00378004 0037e061 00001001 00000000 391c9c54 0002e658 00000000 000000c0
[   56.680000]         fffffffc 00000000 00000000 391c9ea8 391c9cac 000525b6 3c53434c 3c4cd21c
[   56.680000]         391c9c4c 391c9c4c 391c9da8 00005486 0000000b 00000007 00000001 00378dc5
[   56.680000]         0037906c 00379166 00000000 391c9cac 00005ee6 00379166 391c9cac 00000000
[   56.680000]         0037914a 000000ae 0000000e 31cb9380 3c534000 003e6cd0 00002a50 391c9cac
[   56.680000]         3c534000 0000000e 31cb9380 fffffffc 00000000 3c534000 391686b0 391686b0
[   56.680000] Call Trace: [<00001001>] kernel_pg_dir+0x1/0x1000
[   56.680000]  [<0002e658>] do_exit+0x6d2/0x720
[   56.680000]  [<000525b6>] printk+0x0/0x18
[   56.680000]  [<00005486>] die_if_kernel+0x52/0x56
[   56.680000]  [<00005ee6>] bad_super_trap+0x130/0x14e
[   56.680000]  [<00002a50>] trap+0x20/0x28
[   56.680000]  [<0004732e>] set_next_entity+0x4c/0xbe
[   56.680000]  [<000472e2>] set_next_entity+0x0/0xbe
[   56.680000]  [<000489a2>] put_prev_entity+0x0/0x68
[   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
[   56.680000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
[   56.680000]  [<002ef606>] __schedule+0x25e/0x39c
[   56.680000]  [<0006535a>] futex_wait_setup+0x0/0x9c
[   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
[   56.680000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
[   56.680000]  [<002ef3a8>] __schedule+0x0/0x39c
[   56.680000]  [<002e09f0>] list_add_tail+0x1c/0x36
[   56.680000]  [<002ef7ae>] schedule+0x6a/0xb2
[   56.680000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
[   56.680000]  [<00065904>] futex_wait+0x8e/0x150
[   56.680000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
[   56.680000]  [<00066b00>] do_futex+0x94/0x6ee
[   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
[   56.680000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
[   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
[   56.680000]  [<0006737c>] sys_futex_time32+0x106/0x11e
[   56.680000]  [<00002b24>] syscall+0x8/0xc
[   56.680000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
[   56.680000] Code: e061 4879 0037 8004 4eb9 0005 25b6 4e47 <4e56> fff8 48e7 3f1c 266e 0008 2a6e 000c 242b 0020 4a8d 670a 202d 0018 b082 6c02
[   56.680000] Fixing recursive fault but reboot is needed!
[   56.690000] *** ADDRESS ERROR ***   FORMAT=2
[   56.690000] Current process id is 343
[   56.690000] BAD KERNEL TRAP: 00000000
[   56.690000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
[   56.690000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-27  9:14 Kernel crash on qemu-m68k-system while building r-cran packages John Paul Adrian Glaubitz
@ 2020-05-27  9:25 ` John Paul Adrian Glaubitz
  2020-05-29 23:49 ` Michael Schmitz
  1 sibling, 0 replies; 8+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-05-27  9:25 UTC (permalink / raw)
  To: linux-m68k; +Cc: Debian m68k, Laurent Vivier

On 5/27/20 11:14 AM, John Paul Adrian Glaubitz wrote:
> I just ran into the following kernel crash - which is reproducible - when trying
> to build the R package r-cran-phangorn on qemu-m68k-system on Linux 5.6.7.
It can reproduce by just running "R"

# R

(kernel crash)

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-27  9:14 Kernel crash on qemu-m68k-system while building r-cran packages John Paul Adrian Glaubitz
  2020-05-27  9:25 ` John Paul Adrian Glaubitz
@ 2020-05-29 23:49 ` Michael Schmitz
  2020-05-30  8:58   ` Laurent Vivier
  2020-05-30 11:49   ` John Paul Adrian Glaubitz
  1 sibling, 2 replies; 8+ messages in thread
From: Michael Schmitz @ 2020-05-29 23:49 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, linux-m68k; +Cc: Debian m68k, Laurent Vivier

Adrian,

that's from the Motorola FPSP package - the fault instruction is

fmovel #0,%fpsr

at the start of the unsupported data format trap handler. The trap 
handler clears the FPU status register here (and will clear the control 
register in the next instruction). That should not cause an address error.

Can you try to run that R binary on a real 060 or 040?

Cheers,

	Michael


Am 27.05.2020 um 21:14 schrieb John Paul Adrian Glaubitz:
> Hi!
>
> I just ran into the following kernel crash - which is reproducible - when trying
> to build the R package r-cran-phangorn on qemu-m68k-system on Linux 5.6.7.
>
> Adrian
>
> [   56.640000] *** ADDRESS ERROR ***   FORMAT=2
> [   56.640000] Current process id is 728
> [   56.640000] BAD KERNEL TRAP: 00000000
> [   56.640000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
> [   56.640000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
> [   56.640000] SR: 2004  SP: 3eb5e68c  a2: c02e239a
> [   56.640000] d0: 00000040    d1: 00000002    d2: 8002adec    d3: 8002ad50
> [   56.640000] d4: 8002c768    d5: 0000000d    a0: ffffffc2    a1: ffffffc1
> [   56.640000] Process R (pid: 728, task=a3dfda5d)
> [   56.640000] Frame format=2 instr addr=00000000
> [   56.650000] Stack from 3a4d9f30:
> [   56.650000]         41000000 00000002 00000002 ffffffc2 ffffffc1 1fff0000 80000000 00000000
> [   56.650000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
> [   56.650000]         ffffffff 00000000 00050008 00000000 8000067c c02c2000 efffee20 000002d8
> [   56.650000]         00002a28 3a4d9f98 00000002 00000014 fffffffe 8002c768 00000002 00000041
> [   56.650000]         00000002 c041fc58 c0743758 ffffffff 00000000 0008c075 00002b24 00000012
> [   56.650000]         000007d0 00000024 00000002 c05bef04 c05bef04 0000005e 00000077 c28aca70
> [   56.650000] Call Trace: [<00050008>] copy_overflow+0x10/0x28
> [   56.650000]  [<00002a28>] buserr+0x20/0x28
> [   56.650000]  [<0008c075>] bpf_check+0x57f/0x1cfa
> [   56.650000]  [<00002b24>] syscall+0x8/0xc
> [   56.650000]  [<0000c019>] dn_sched_init+0x75/0x88
> [   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
> [   56.650000] Disabling lock debugging due to kernel taint
> [   56.650000] *** ADDRESS ERROR ***   FORMAT=2
> [   56.650000] Current process id is 7
> [   56.650000] BAD KERNEL TRAP: 00000000
> [   56.650000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
> [   56.650000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
> [   56.650000] SR: 2704  SP: 5ca00d79  a2: 391686b0
> [   56.650000] d0: 00000040    d1: 3dc64d60    d2: 0000000e    d3: 309a6680
> [   56.650000] d4: fffffffc    d5: 00000000    a0: 3dc64d60    a1: 391686b0
> [   56.650000] Process ksoftirqd/0 (pid: 7, task=018bf318)
> [   56.650000] Frame format=2 instr addr=00000000
> [   56.650000] Stack from 3dc79e44:
> [   56.650000]         41000000 00000000 3dc64d60 3dc64d60 391686b0 1fff0000 80000000 00000000
> [   56.650000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
> [   56.650000]         ffffffff 00000000 00000000 00000000 00000004 00000004 00000000 00000000
> [   56.650000]         0003f400 00000009 003e6ce0 003e6d10 391686dc 003e6ce0 00414bf4 39168641
> [   56.650000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2 000489a2 00042114 3dc64d8c
> [   56.650000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0 391686dc 003e6ce0 3dc64d8c
> [   56.650000] Call Trace: [<0003f400>] arch_local_irq_enable+0x8/0x26
> [   56.650000]  [<0004732e>] set_next_entity+0x4c/0xbe
> [   56.650000]  [<000472e2>] set_next_entity+0x0/0xbe
> [   56.650000]  [<000489a2>] put_prev_entity+0x0/0x68
> [   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
> [   56.650000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
> [   56.650000]  [<002ef606>] __schedule+0x25e/0x39c
> [   56.650000]  [<0003f4ca>] kthread_parkme+0x0/0x10
> [   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
> [   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
> [   56.650000]  [<002ef3a8>] __schedule+0x0/0x39c
> [   56.650000]  [<0003f450>] kthread_should_stop+0x0/0x12
> [   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
> [   56.650000]  [<002ef7ae>] schedule+0x6a/0xb2
> [   56.650000]  [<002ef744>] schedule+0x0/0xb2
> [   56.650000]  [<0003f476>] kthread_should_park+0x0/0xc
> [   56.650000]  [<000421b8>] smpboot_thread_fn+0xa4/0x100
> [   56.650000]  [<0002df86>] do_exit+0x0/0x720
> [   56.650000]  [<0004bd4a>] complete+0x0/0x34
> [   56.650000]  [<00040190>] kthread+0xb8/0xc2
> [   56.650000]  [<000400d8>] kthread+0x0/0xc2
> [   56.650000]  [<00002a74>] ret_from_kernel_thread+0xc/0x14
> [   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
> [   56.670000] *** ADDRESS ERROR ***   FORMAT=2
> [   56.670000] Current process id is 174
> [   56.670000] BAD KERNEL TRAP: 00000000
> [   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
> [   56.670000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
> [   56.670000] SR: 2704  SP: 82add07d  a2: 391686b0
> [   56.670000] d0: efd57040    d1: 3c534000    d2: 0000000e    d3: 31cb9380
> [   56.670000] d4: fffffffc    d5: 00000000    a0: 3c534000    a1: 391686b0
> [   56.670000] Process systemd-journal (pid: 174, task=9a58f959)
> [   56.670000] Frame format=2 instr addr=00000000
> [   56.670000] Stack from 391c9ce4:
> [   56.670000]         41000000 efd57054 3c534000 3c534000 391686b0 1fff0000 80000000 00000000
> [   56.670000]         3fbf0000 80000000 00000000 00000000 20000000 00000000 7fff0000 ffffffff
> [   56.670000]         ffffffff 00000000 04000000 00000000 00000004 00000006 00000000 00000000
> [   56.670000]         00000000 00000009 003e6ce0 003e6d10 391686dc 003e6ce0 00414bf4 39168641
> [   56.670000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2 000489a2 000657d0 3c53402c
> [   56.670000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0 391686dc 003e6ce0 3c53402c
> [   56.670000] Call Trace: [<0004732e>] set_next_entity+0x4c/0xbe
> [   56.670000]  [<000472e2>] set_next_entity+0x0/0xbe
> [   56.670000]  [<000489a2>] put_prev_entity+0x0/0x68
> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
> [   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
> [   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
> [   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
> [   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
> [   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
> [   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
> [   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
> [   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
> [   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
> [   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
> [   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
> [   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
> [   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
> [   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
> [   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
> [   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
> [   56.670000]  [<00065904>] futex_wait+0x8e/0x150
> [   56.670000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
> [   56.670000]  [<00066b00>] do_futex+0x94/0x6ee
> [   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
> [   56.670000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
> [   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
> [   56.670000]  [<0006737c>] sys_futex_time32+0x106/0x11e
> [   56.670000]  [<00002b24>] syscall+0x8/0xc
> [   56.670000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
> [   56.670000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a 0281
> [   56.670000] kernel BUG at kernel/sched/core.c:4097!
> [   56.670000] *** TRAP #7 ***   FORMAT=0
> [   56.670000] Current process id is 174
> [   56.670000] BAD KERNEL TRAP: 00000000
> [   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
> [   56.670000] PC: [<0004518c>] rt_mutex_setprio+0x0/0x1ae
> [   56.670000] SR: 2000  SP: 249d2574  a2: 3c534000
> [   56.680000] d0: 00000027    d1: 00002000    d2: 391c9c4c    d3: 391c9c4c
> [   56.680000] d4: 0002d374    d5: 00000000    a0: 003e7b54    a1: 5000c022
> [   56.680000] Process systemd-journal (pid: 174, task=9a58f959)
> [   56.680000] Frame format=0
> [   56.680000] Stack from 391c9c0c:
> [   56.680000]         00378004 0037e061 00001001 00000000 391c9c54 0002e658 00000000 000000c0
> [   56.680000]         fffffffc 00000000 00000000 391c9ea8 391c9cac 000525b6 3c53434c 3c4cd21c
> [   56.680000]         391c9c4c 391c9c4c 391c9da8 00005486 0000000b 00000007 00000001 00378dc5
> [   56.680000]         0037906c 00379166 00000000 391c9cac 00005ee6 00379166 391c9cac 00000000
> [   56.680000]         0037914a 000000ae 0000000e 31cb9380 3c534000 003e6cd0 00002a50 391c9cac
> [   56.680000]         3c534000 0000000e 31cb9380 fffffffc 00000000 3c534000 391686b0 391686b0
> [   56.680000] Call Trace: [<00001001>] kernel_pg_dir+0x1/0x1000
> [   56.680000]  [<0002e658>] do_exit+0x6d2/0x720
> [   56.680000]  [<000525b6>] printk+0x0/0x18
> [   56.680000]  [<00005486>] die_if_kernel+0x52/0x56
> [   56.680000]  [<00005ee6>] bad_super_trap+0x130/0x14e
> [   56.680000]  [<00002a50>] trap+0x20/0x28
> [   56.680000]  [<0004732e>] set_next_entity+0x4c/0xbe
> [   56.680000]  [<000472e2>] set_next_entity+0x0/0xbe
> [   56.680000]  [<000489a2>] put_prev_entity+0x0/0x68
> [   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
> [   56.680000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
> [   56.680000]  [<002ef606>] __schedule+0x25e/0x39c
> [   56.680000]  [<0006535a>] futex_wait_setup+0x0/0x9c
> [   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
> [   56.680000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
> [   56.680000]  [<002ef3a8>] __schedule+0x0/0x39c
> [   56.680000]  [<002e09f0>] list_add_tail+0x1c/0x36
> [   56.680000]  [<002ef7ae>] schedule+0x6a/0xb2
> [   56.680000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
> [   56.680000]  [<00065904>] futex_wait+0x8e/0x150
> [   56.680000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
> [   56.680000]  [<00066b00>] do_futex+0x94/0x6ee
> [   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
> [   56.680000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
> [   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
> [   56.680000]  [<0006737c>] sys_futex_time32+0x106/0x11e
> [   56.680000]  [<00002b24>] syscall+0x8/0xc
> [   56.680000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
> [   56.680000] Code: e061 4879 0037 8004 4eb9 0005 25b6 4e47 <4e56> fff8 48e7 3f1c 266e 0008 2a6e 000c 242b 0020 4a8d 670a 202d 0018 b082 6c02
> [   56.680000] Fixing recursive fault but reboot is needed!
> [   56.690000] *** ADDRESS ERROR ***   FORMAT=2
> [   56.690000] Current process id is 343
> [   56.690000] BAD KERNEL TRAP: 00000000
> [   56.690000] Modules linked in: sg evdev mac_hid ip_tables x_tables sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
> [   56.690000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-29 23:49 ` Michael Schmitz
@ 2020-05-30  8:58   ` Laurent Vivier
  2020-05-30 11:49   ` John Paul Adrian Glaubitz
  1 sibling, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-30  8:58 UTC (permalink / raw)
  To: Michael Schmitz, John Paul Adrian Glaubitz, linux-m68k; +Cc: Debian m68k

Le 30/05/2020 à 01:49, Michael Schmitz a écrit :
> Adrian,
> 
> that's from the Motorola FPSP package - the fault instruction is
> 
> fmovel #0,%fpsr
> 
> at the start of the unsupported data format trap handler. The trap
> handler clears the FPU status register here (and will clear the control
> register in the next instruction). That should not cause an address error.
> 
> Can you try to run that R binary on a real 060 or 040?

It could be interesting to enable the TCG trace in QEMU.

If you have access to the QEMU monitor use the following command before
running R:

logfile qemu.log
log in_asm,op,int

and share the file qemu.log

Thanks,
Laurent

> Cheers,
> 
>     Michael
> 
> 
> Am 27.05.2020 um 21:14 schrieb John Paul Adrian Glaubitz:
>> Hi!
>>
>> I just ran into the following kernel crash - which is reproducible -
>> when trying
>> to build the R package r-cran-phangorn on qemu-m68k-system on Linux
>> 5.6.7.
>>
>> Adrian
>>
>> [   56.640000] *** ADDRESS ERROR ***   FORMAT=2
>> [   56.640000] Current process id is 728
>> [   56.640000] BAD KERNEL TRAP: 00000000
>> [   56.640000] Modules linked in: sg evdev mac_hid ip_tables x_tables
>> sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2
>> crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic
>> crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
>> [   56.640000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
>> [   56.640000] SR: 2004  SP: 3eb5e68c  a2: c02e239a
>> [   56.640000] d0: 00000040    d1: 00000002    d2: 8002adec    d3:
>> 8002ad50
>> [   56.640000] d4: 8002c768    d5: 0000000d    a0: ffffffc2    a1:
>> ffffffc1
>> [   56.640000] Process R (pid: 728, task=a3dfda5d)
>> [   56.640000] Frame format=2 instr addr=00000000
>> [   56.650000] Stack from 3a4d9f30:
>> [   56.650000]         41000000 00000002 00000002 ffffffc2 ffffffc1
>> 1fff0000 80000000 00000000
>> [   56.650000]         3fbf0000 80000000 00000000 00000000 20000000
>> 00000000 7fff0000 ffffffff
>> [   56.650000]         ffffffff 00000000 00050008 00000000 8000067c
>> c02c2000 efffee20 000002d8
>> [   56.650000]         00002a28 3a4d9f98 00000002 00000014 fffffffe
>> 8002c768 00000002 00000041
>> [   56.650000]         00000002 c041fc58 c0743758 ffffffff 00000000
>> 0008c075 00002b24 00000012
>> [   56.650000]         000007d0 00000024 00000002 c05bef04 c05bef04
>> 0000005e 00000077 c28aca70
>> [   56.650000] Call Trace: [<00050008>] copy_overflow+0x10/0x28
>> [   56.650000]  [<00002a28>] buserr+0x20/0x28
>> [   56.650000]  [<0008c075>] bpf_check+0x57f/0x1cfa
>> [   56.650000]  [<00002b24>] syscall+0x8/0xc
>> [   56.650000]  [<0000c019>] dn_sched_init+0x75/0x88
>> [   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c>
>> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a
>> 0281
>> [   56.650000] Disabling lock debugging due to kernel taint
>> [   56.650000] *** ADDRESS ERROR ***   FORMAT=2
>> [   56.650000] Current process id is 7
>> [   56.650000] BAD KERNEL TRAP: 00000000
>> [   56.650000] Modules linked in: sg evdev mac_hid ip_tables x_tables
>> sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2
>> crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic
>> crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
>> [   56.650000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
>> [   56.650000] SR: 2704  SP: 5ca00d79  a2: 391686b0
>> [   56.650000] d0: 00000040    d1: 3dc64d60    d2: 0000000e    d3:
>> 309a6680
>> [   56.650000] d4: fffffffc    d5: 00000000    a0: 3dc64d60    a1:
>> 391686b0
>> [   56.650000] Process ksoftirqd/0 (pid: 7, task=018bf318)
>> [   56.650000] Frame format=2 instr addr=00000000
>> [   56.650000] Stack from 3dc79e44:
>> [   56.650000]         41000000 00000000 3dc64d60 3dc64d60 391686b0
>> 1fff0000 80000000 00000000
>> [   56.650000]         3fbf0000 80000000 00000000 00000000 20000000
>> 00000000 7fff0000 ffffffff
>> [   56.650000]         ffffffff 00000000 00000000 00000000 00000004
>> 00000004 00000000 00000000
>> [   56.650000]         0003f400 00000009 003e6ce0 003e6d10 391686dc
>> 003e6ce0 00414bf4 39168641
>> [   56.650000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2
>> 000489a2 00042114 3dc64d8c
>> [   56.650000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0
>> 391686dc 003e6ce0 3dc64d8c
>> [   56.650000] Call Trace: [<0003f400>] arch_local_irq_enable+0x8/0x26
>> [   56.650000]  [<0004732e>] set_next_entity+0x4c/0xbe
>> [   56.650000]  [<000472e2>] set_next_entity+0x0/0xbe
>> [   56.650000]  [<000489a2>] put_prev_entity+0x0/0x68
>> [   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
>> [   56.650000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
>> [   56.650000]  [<002ef606>] __schedule+0x25e/0x39c
>> [   56.650000]  [<0003f4ca>] kthread_parkme+0x0/0x10
>> [   56.650000]  [<00042114>] smpboot_thread_fn+0x0/0x100
>> [   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
>> [   56.650000]  [<002ef3a8>] __schedule+0x0/0x39c
>> [   56.650000]  [<0003f450>] kthread_should_stop+0x0/0x12
>> [   56.650000]  [<0003f5cc>] __init_completion+0x0/0x20
>> [   56.650000]  [<002ef7ae>] schedule+0x6a/0xb2
>> [   56.650000]  [<002ef744>] schedule+0x0/0xb2
>> [   56.650000]  [<0003f476>] kthread_should_park+0x0/0xc
>> [   56.650000]  [<000421b8>] smpboot_thread_fn+0xa4/0x100
>> [   56.650000]  [<0002df86>] do_exit+0x0/0x720
>> [   56.650000]  [<0004bd4a>] complete+0x0/0x34
>> [   56.650000]  [<00040190>] kthread+0xb8/0xc2
>> [   56.650000]  [<000400d8>] kthread+0x0/0xc2
>> [   56.650000]  [<00002a74>] ret_from_kernel_thread+0xc/0x14
>> [   56.650000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c>
>> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a
>> 0281
>> [   56.670000] *** ADDRESS ERROR ***   FORMAT=2
>> [   56.670000] Current process id is 174
>> [   56.670000] BAD KERNEL TRAP: 00000000
>> [   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables
>> sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2
>> crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic
>> crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
>> [   56.670000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
>> [   56.670000] SR: 2704  SP: 82add07d  a2: 391686b0
>> [   56.670000] d0: efd57040    d1: 3c534000    d2: 0000000e    d3:
>> 31cb9380
>> [   56.670000] d4: fffffffc    d5: 00000000    a0: 3c534000    a1:
>> 391686b0
>> [   56.670000] Process systemd-journal (pid: 174, task=9a58f959)
>> [   56.670000] Frame format=2 instr addr=00000000
>> [   56.670000] Stack from 391c9ce4:
>> [   56.670000]         41000000 efd57054 3c534000 3c534000 391686b0
>> 1fff0000 80000000 00000000
>> [   56.670000]         3fbf0000 80000000 00000000 00000000 20000000
>> 00000000 7fff0000 ffffffff
>> [   56.670000]         ffffffff 00000000 04000000 00000000 00000004
>> 00000006 00000000 00000000
>> [   56.670000]         00000000 00000009 003e6ce0 003e6d10 391686dc
>> 003e6ce0 00414bf4 39168641
>> [   56.670000]         0004732e 391686e8 003e6d10 003e6ce0 000472e2
>> 000489a2 000657d0 3c53402c
>> [   56.670000]         391686b0 391686dc 003e6ce0 00048b82 003e6ce0
>> 391686dc 003e6ce0 3c53402c
>> [   56.670000] Call Trace: [<0004732e>] set_next_entity+0x4c/0xbe
>> [   56.670000]  [<000472e2>] set_next_entity+0x0/0xbe
>> [   56.670000]  [<000489a2>] put_prev_entity+0x0/0x68
>> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
>> [   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
>> [   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
>> [   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
>> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
>> [   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
>> [   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
>> [   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
>> [   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
>> [   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
>> [   56.670000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
>> [   56.670000]  [<002ef606>] __schedule+0x25e/0x39c
>> [   56.670000]  [<0006535a>] futex_wait_setup+0x0/0x9c
>> [   56.670000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
>> [   56.670000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
>> [   56.670000]  [<002ef3a8>] __schedule+0x0/0x39c
>> [   56.670000]  [<002e09f0>] list_add_tail+0x1c/0x36
>> [   56.670000]  [<002ef7ae>] schedule+0x6a/0xb2
>> [   56.670000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
>> [   56.670000]  [<00065904>] futex_wait+0x8e/0x150
>> [   56.670000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
>> [   56.670000]  [<00066b00>] do_futex+0x94/0x6ee
>> [   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
>> [   56.670000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
>> [   56.670000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
>> [   56.670000]  [<0006737c>] sys_futex_time32+0x106/0x11e
>> [   56.670000]  [<00002b24>] syscall+0x8/0xc
>> [   56.670000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
>> [   56.670000] Code: 1017 0200 00f0 0c00 0040 66ff 0000 05ac <f23c>
>> 8800 0000 0000 f23c 9000 0000 0000 222e ff84 082e 0005 ff1c 6600 000a
>> 0281
>> [   56.670000] kernel BUG at kernel/sched/core.c:4097!
>> [   56.670000] *** TRAP #7 ***   FORMAT=0
>> [   56.670000] Current process id is 174
>> [   56.670000] BAD KERNEL TRAP: 00000000
>> [   56.670000] Modules linked in: sg evdev mac_hid ip_tables x_tables
>> sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2
>> crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic
>> crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
>> [   56.670000] PC: [<0004518c>] rt_mutex_setprio+0x0/0x1ae
>> [   56.670000] SR: 2000  SP: 249d2574  a2: 3c534000
>> [   56.680000] d0: 00000027    d1: 00002000    d2: 391c9c4c    d3:
>> 391c9c4c
>> [   56.680000] d4: 0002d374    d5: 00000000    a0: 003e7b54    a1:
>> 5000c022
>> [   56.680000] Process systemd-journal (pid: 174, task=9a58f959)
>> [   56.680000] Frame format=0
>> [   56.680000] Stack from 391c9c0c:
>> [   56.680000]         00378004 0037e061 00001001 00000000 391c9c54
>> 0002e658 00000000 000000c0
>> [   56.680000]         fffffffc 00000000 00000000 391c9ea8 391c9cac
>> 000525b6 3c53434c 3c4cd21c
>> [   56.680000]         391c9c4c 391c9c4c 391c9da8 00005486 0000000b
>> 00000007 00000001 00378dc5
>> [   56.680000]         0037906c 00379166 00000000 391c9cac 00005ee6
>> 00379166 391c9cac 00000000
>> [   56.680000]         0037914a 000000ae 0000000e 31cb9380 3c534000
>> 003e6cd0 00002a50 391c9cac
>> [   56.680000]         3c534000 0000000e 31cb9380 fffffffc 00000000
>> 3c534000 391686b0 391686b0
>> [   56.680000] Call Trace: [<00001001>] kernel_pg_dir+0x1/0x1000
>> [   56.680000]  [<0002e658>] do_exit+0x6d2/0x720
>> [   56.680000]  [<000525b6>] printk+0x0/0x18
>> [   56.680000]  [<00005486>] die_if_kernel+0x52/0x56
>> [   56.680000]  [<00005ee6>] bad_super_trap+0x130/0x14e
>> [   56.680000]  [<00002a50>] trap+0x20/0x28
>> [   56.680000]  [<0004732e>] set_next_entity+0x4c/0xbe
>> [   56.680000]  [<000472e2>] set_next_entity+0x0/0xbe
>> [   56.680000]  [<000489a2>] put_prev_entity+0x0/0x68
>> [   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
>> [   56.680000]  [<00048b82>] pick_next_task_fair+0x14e/0x186
>> [   56.680000]  [<002ef606>] __schedule+0x25e/0x39c
>> [   56.680000]  [<0006535a>] futex_wait_setup+0x0/0x9c
>> [   56.680000]  [<000657d0>] futex_wait_queue_me+0x0/0xa6
>> [   56.680000]  [<00064bb8>] __unqueue_futex+0x0/0x3c
>> [   56.680000]  [<002ef3a8>] __schedule+0x0/0x39c
>> [   56.680000]  [<002e09f0>] list_add_tail+0x1c/0x36
>> [   56.680000]  [<002ef7ae>] schedule+0x6a/0xb2
>> [   56.680000]  [<00065848>] futex_wait_queue_me+0x78/0xa6
>> [   56.680000]  [<00065904>] futex_wait+0x8e/0x150
>> [   56.680000]  [<0004fe94>] arch_local_irq_enable+0x0/0x26
>> [   56.680000]  [<00066b00>] do_futex+0x94/0x6ee
>> [   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
>> [   56.680000]  [<0005bef6>] timekeeping_get_ns+0x4e/0x58
>> [   56.680000]  [<0000c041>] dn_serial_console_wait_key+0x15/0x24
>> [   56.680000]  [<0006737c>] sys_futex_time32+0x106/0x11e
>> [   56.680000]  [<00002b24>] syscall+0x8/0xc
>> [   56.680000]  [<0010c06b>] __blkdev_get+0x3f/0x3ce
>> [   56.680000] Code: e061 4879 0037 8004 4eb9 0005 25b6 4e47 <4e56>
>> fff8 48e7 3f1c 266e 0008 2a6e 000c 242b 0020 4a8d 670a 202d 0018 b082
>> 6c02
>> [   56.680000] Fixing recursive fault but reboot is needed!
>> [   56.690000] *** ADDRESS ERROR ***   FORMAT=2
>> [   56.690000] Current process id is 343
>> [   56.690000] BAD KERNEL TRAP: 00000000
>> [   56.690000] Modules linked in: sg evdev mac_hid ip_tables x_tables
>> sha1_generic hmac ipv6 nf_defrag_ipv6 autofs4 ext4 crc16 mbcache jbd2
>> crc32c_generic sd_mod t10_pi crc_t10dif crct10dif_generic
>> crct10dif_common sr_mod cdrom mac_esp macsonic esp_scsi
>> [   56.690000] PC: [<00016a2c>] X_UNSUPP+0x2c/0x3c
>>
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-29 23:49 ` Michael Schmitz
  2020-05-30  8:58   ` Laurent Vivier
@ 2020-05-30 11:49   ` John Paul Adrian Glaubitz
  2020-05-30 15:12     ` Laurent Vivier
  1 sibling, 1 reply; 8+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-05-30 11:49 UTC (permalink / raw)
  To: Michael Schmitz, linux-m68k; +Cc: Debian m68k, Laurent Vivier

Hi Michael!

On 5/30/20 1:49 AM, Michael Schmitz wrote:
> Can you try to run that R binary on a real 060 or 040?
Works fine on elgar:

root@elgar:~> R

R version 4.0.1 beta (2020-05-27 r78593) -- "See Things Now"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: m68k-unknown-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> print("Hello World!")
[1] "Hello World!"
> print("Hello World!", quote = FALSE)
[1] Hello World!
> demo()
Demos in package 'base':

error.catching          More examples on catching and handling errors
is.things               Explore some properties of R objects and
                        is.FOO() functions. Not for newbies!
recursion               Using recursion for adaptive integration
scoping                 An illustration of lexical scoping.

Demos in package 'grDevices':

colors                  A show of R's predefined colors()
hclColors               Exploration of hcl() space

Demos in package 'graphics':

Hershey                 Tables of the characters in the Hershey vector
                        fonts
Japanese                Tables of the Japanese characters in the
                        Hershey vector fonts
graphics                A show of some of R's graphics capabilities
image                   The image-like graphics builtins of R
persp                   Extended persp() examples
plotmath                Examples of the use of mathematics annotation

Demos in package 'stats':

glm.vr                  Some glm() examples from V&R with several
                        predictors
lm.glm                  Some linear and generalized linear modelling
                        examples from `An Introduction to Statistical
                        Modelling' by Annette Dobson
nlm                     Nonlinear least-squares using nlm()
smooth                  `Visualize' steps in Tukey's smoothers


Use 'demo(package = .packages(all.available = TRUE))'
to list the demos in all *available* packages.

> quit
function (save = "default", status = 0, runLast = TRUE) 
.Internal(quit(save, status, runLast))
<bytecode: 0x812ff828>
<environment: namespace:base>
> exit
Error: object 'exit' not found
> 
Save workspace image? [y/n/c]: n
root@elgar:~>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-30 11:49   ` John Paul Adrian Glaubitz
@ 2020-05-30 15:12     ` Laurent Vivier
  2020-05-30 15:27       ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Vivier @ 2020-05-30 15:12 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz, Michael Schmitz, linux-m68k; +Cc: Debian m68k

Le 30/05/2020 à 13:49, John Paul Adrian Glaubitz a écrit :
> Hi Michael!
> 
> On 5/30/20 1:49 AM, Michael Schmitz wrote:
>> Can you try to run that R binary on a real 060 or 040?
> Works fine on elgar:
> 
> root@elgar:~> R


As the package is available, I've been able to reproduce the problem
with logs enabled. Apparently the instruction is not decoded correctly:

----------------
IN:
0x00016a2c:  fmovel #0,%fpsr
Disassembler disagrees with translator over instruction decoding
Please report this to qemu-devel@nongnu.org

OP:
 ld_i32 tmp0,env,$0xfffffffffffffff0
 movi_i32 tmp1,$0x0
 brcond_i32 tmp0,tmp1,lt,$L0

 ---- 00016a2c 00000000
 movi_i32 PC,$0x16a2c
 movi_i32 tmp0,$0x3
 call raise_exception,$0x0,$0,env,tmp0
 set_label $L0
 exit_tb $0x7fc2a0da5643

INT  49331: Address Error(0xc) pc=00016a2c sp=3cc91f30 sr=2004

I try to fix that...

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-30 15:12     ` Laurent Vivier
@ 2020-05-30 15:27       ` John Paul Adrian Glaubitz
  2020-05-30 16:19         ` Laurent Vivier
  0 siblings, 1 reply; 8+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-05-30 15:27 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Michael Schmitz, linux-m68k, Debian m68k

Hi Laurent!

On 5/30/20 5:12 PM, Laurent Vivier wrote:
> As the package is available, I've been able to reproduce the problem
> with logs enabled. Apparently the instruction is not decoded correctly:
> 
> ----------------
> IN:
> 0x00016a2c:  fmovel #0,%fpsr
> Disassembler disagrees with translator over instruction decoding
> Please report this to qemu-devel@nongnu.org
> 
> OP:
>  ld_i32 tmp0,env,$0xfffffffffffffff0
>  movi_i32 tmp1,$0x0
>  brcond_i32 tmp0,tmp1,lt,$L0
> 
>  ---- 00016a2c 00000000
>  movi_i32 PC,$0x16a2c
>  movi_i32 tmp0,$0x3
>  call raise_exception,$0x0,$0,env,tmp0
>  set_label $L0
>  exit_tb $0x7fc2a0da5643
> 
> INT  49331: Address Error(0xc) pc=00016a2c sp=3cc91f30 sr=2004
> 
> I try to fix that...

Ah, cool. Thanks a lot. And sorry for not replying earlier, I missed your
previous mail.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Kernel crash on qemu-m68k-system while building r-cran packages
  2020-05-30 15:27       ` John Paul Adrian Glaubitz
@ 2020-05-30 16:19         ` Laurent Vivier
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-30 16:19 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Michael Schmitz, linux-m68k, Debian m68k

Le 30/05/2020 à 17:27, John Paul Adrian Glaubitz a écrit :
> Hi Laurent!
> 
> On 5/30/20 5:12 PM, Laurent Vivier wrote:
>> As the package is available, I've been able to reproduce the problem
>> with logs enabled. Apparently the instruction is not decoded correctly:
>>
>> ----------------
>> IN:
>> 0x00016a2c:  fmovel #0,%fpsr
>> Disassembler disagrees with translator over instruction decoding
>> Please report this to qemu-devel@nongnu.org
>>
>> OP:
>>  ld_i32 tmp0,env,$0xfffffffffffffff0
>>  movi_i32 tmp1,$0x0
>>  brcond_i32 tmp0,tmp1,lt,$L0
>>
>>  ---- 00016a2c 00000000
>>  movi_i32 PC,$0x16a2c
>>  movi_i32 tmp0,$0x3
>>  call raise_exception,$0x0,$0,env,tmp0
>>  set_label $L0
>>  exit_tb $0x7fc2a0da5643
>>
>> INT  49331: Address Error(0xc) pc=00016a2c sp=3cc91f30 sr=2004
>>
>> I try to fix that...
> 
> Ah, cool. Thanks a lot. And sorry for not replying earlier, I missed your
> previous mail.

No problem.

I've investigated and the fmovel with immediate value is not implemented...

The following patch fixes the crash but then I have a soft lockup. IT
needs more investigation.

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 0f80888203d3..c093f6c683e8 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -4936,6 +4936,20 @@ static void gen_op_fmove_fcr(CPUM68KState *env,
DisasContext *s,
             gen_store_fcr(s, AREG(insn, 0), mask);
         }
         return;
+    case 7: /* Immediate */
+        if (REG(insn, 0) == 4) {
+            if (is_write ||
+                (mask != M68K_FPIAR && mask != M68K_FPSR &&
+                 mask != M68K_FPCR)) {
+                gen_exception(s, s->base.pc_next, EXCP_ILLEGAL);
+                return;
+            }
+            tmp = tcg_const_i32(read_im32(env, s));
+            gen_store_fcr(s, tmp, mask);
+            tcg_temp_free(tmp);
+            return;
+        }
+        break;
     default:
         break;
     }

Thanks,
Laurent


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-30 16:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27  9:14 Kernel crash on qemu-m68k-system while building r-cran packages John Paul Adrian Glaubitz
2020-05-27  9:25 ` John Paul Adrian Glaubitz
2020-05-29 23:49 ` Michael Schmitz
2020-05-30  8:58   ` Laurent Vivier
2020-05-30 11:49   ` John Paul Adrian Glaubitz
2020-05-30 15:12     ` Laurent Vivier
2020-05-30 15:27       ` John Paul Adrian Glaubitz
2020-05-30 16:19         ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).