Ubuntu18.04.3 - LTP testcase gets stacktrace running 'kernel: ltp_block_dev: Test Case 7: unregister_blkdev() with major=0'

Bug #1852294 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Won't Fix
Medium
Canonical Kernel Team
linux (Ubuntu)
Invalid
Undecided
Skipper Bug Screeners

Bug Description

Running LTP test on Ubuntu Server 18.04.3 (kernel 4.15) on s390x results in the following warning stack trace in the journalctl.

Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 5: register_blkdev() with major=512/4294967295 Oct 29 22:47:43 t35lp04 kernel: register_blkdev: major requested (512) is greater than the maximum (512) for ltp_block_dev Oct 29 22:47:43 t35lp04 kernel: register_blkdev: major requested (-1) is greater than the maximum (512) for ltp_block_dev Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case Result: PASS Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 6: register_blkdev() with name="" Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case Result: PASS Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 7: unregister_blkdev() with major=0 Oct 29 22:47:43 t35lp04 kernel: ------------[ cut here ]------------ Oct 29 22:47:43 t35lp04 kernel: WARNING: CPU: 10 PID: 93645 at /build/linux-ru4Kqk/linux-4.15.0/block/genhd.c:412 unregister_blkdev+0xb6/0x110 Oct 29 22:47:43 t35lp04 kernel: Modules linked in: ltp_block_dev(OE) vmac chacha20_generic poly1305_generic chacha20poly1305 algif_aead authenc pcrypt crypto_user xfrm_user xfrm_algo sha3_generic algif_hash salsa20_generic algif_skcipher af_alg msdos dummy veth binfmt_misc sctp brd nls_utf8 nls_iso8859_1 ntfs btrfs xor zstd_compress zlib_deflate raid6_pq xfs libcrc32c overlay dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua s390_trng ghash_s390 prng aes_s390 des_s390 des_generic qeth_l2 sha512_s390 sha256_s390 sha1_s390 sha_common chsc_sch eadm_sch qeth ccwgroup vfio_ccw vfio_mdev mdev vfio_iommu_type1 vfio sch_fq_codel ip_tables x_tables crc32_vx_s390 zfcp qdio scsi_transport_fc dasd_eckd_mod dasd_mod [last unloaded: ltp_fw_load] Oct 29 22:47:43 t35lp04 kernel: CPU: 10 PID: 93645 Comm: block_dev Tainted: G OE 4.15.0-66-generic #75-Ubuntu Oct 29 22:47:43 t35lp04 kernel: Hardware name: IBM 8561 T01 403 (LPAR) Oct 29 22:47:43 t35lp04 kernel: Krnl PSW : 00000000dbddaa8b 00000000a41f3293 (unregister_blkdev+0xb6/0x110) Oct 29 22:47:43 t35lp04 kernel: R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 Oct 29 22:47:43 t35lp04 kernel: Krnl GPRS: 0000000000000800 0000000000000006 0000000000000024 0000000000000007 Oct 29 22:47:43 t35lp04 kernel: 00000000005c6672 000000007fe03000 0000000000000001 000002aa3f9de4c0 Oct 29 22:47:43 t35lp04 kernel: 00000004569dbf00 0000000000000001 000003ff800be11c 0000000000000000 Oct 29 22:47:43 t35lp04 kernel: 0000000000000000 000000000094ebb0 00000000005c6672 00000004569dbd10 Oct 29 22:47:43 t35lp04 kernel: Krnl Code: 00000000005c6666: c02000260c97 larl %r2,a87f94 00000000005c666c: c0e5ffe0f502 brasl %r14,1e5070 #00000000005c6672: a7f40001 brc 15,5c6674 >00000000005c6676: a7c90000 lghi %r12,0 00000000005c667a: a7f4001c brc 15,5c66b2 00000000005c667e: ec2c1dbc0359 risbgn %r2,%r12,29,188,3 00000000005c6684: b90400c1 lgr %r12,%r1 00000000005c6688: c010004cd4b8 larl %r1,f60ff8 Oct 29 22:47:43 t35lp04 kernel: Call Trace: Oct 29 22:47:43 t35lp04 kernel: ([<00000000005c6672>] unregister_blkdev+0xb2/0x110) Oct 29 22:47:43 t35lp04 kernel: [<000003ff800bd798>] sys_tcase+0x560/0x9a0 [ltp_block_dev] Oct 29 22:47:43 t35lp04 kernel: [<000000000042c7fc>] kernfs_fop_write+0xdc/0x218 Oct 29 22:47:43 t35lp04 kernel: [<000000000038a1fc>] vfs_write+0x184/0x1e8 Oct 29 22:47:43 t35lp04 kernel: [<000000000038a444>] SyS_write+0x6c/0xf0 Oct 29 22:47:43 t35lp04 kernel: [<00000000008f7454>] system_call+0xd8/0x2c8 Oct 29 22:47:43 t35lp04 kernel: Last Breaking-Event-Address: Oct 29 22:47:43 t35lp04 kernel: [<00000000005c6672>] unregister_blkdev+0xb2/0x110 Oct 29 22:47:43 t35lp04 kernel: ---[ end trace e89fa54649b0cc78 ]--- Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case Result: PASS Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: device released Oct 29 22:47:43 t35lp04 LTP: starting tpci Oct 29 22:47:43 t35lp04 LTP: starting tbio

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-182146 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (9.4 KiB)

------- Comment From <email address hidden> 2019-11-13 03:56 EDT-------
---Problem Description---
Running LTP test results in the following warning stack trace in the journalctl. Please let me know if any additional data is needed.

Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 5: register_blkdev() with major=512/4294967295
Oct 29 22:47:43 t35lp04 kernel: register_blkdev: major requested (512) is greater than the maximum (512) for ltp_block_dev
Oct 29 22:47:43 t35lp04 kernel: register_blkdev: major requested (-1) is greater than the maximum (512) for ltp_block_dev
Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case Result: PASS
Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 6: register_blkdev() with name=""
Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case Result: PASS
Oct 29 22:47:43 t35lp04 kernel: ltp_block_dev: Test Case 7: unregister_blkdev() with major=0
Oct 29 22:47:43 t35lp04 kernel: ------------[ cut here ]------------
Oct 29 22:47:43 t35lp04 kernel: WARNING: CPU: 10 PID: 93645 at /build/linux-ru4Kqk/linux-4.15.0/block/genhd.c:412 unregister_blkdev+0xb6/0x110
Oct 29 22:47:43 t35lp04 kernel: Modules linked in: ltp_block_dev(OE) vmac chacha20_generic poly1305_generic chacha20poly1305 algif_aead authenc pcrypt crypto_user xfrm_user xfrm_algo sha3_generic algif_hash salsa20_generic algif_skcipher af_alg msdos dummy veth binfmt_misc sctp brd nls_utf8 nls_iso8859_1 ntfs btrfs xor zstd_compress zlib_deflate raid6_pq xfs libcrc32c overlay dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua s390_trng ghash_s390 prng aes_s390 des_s390 des_generic qeth_l2 sha512_s390 sha256_s390 sha1_s390 sha_common chsc_sch eadm_sch qeth ccwgroup vfio_ccw vfio_mdev mdev vfio_iommu_type1 vfio sch_fq_codel ip_tables x_tables crc32_vx_s390 zfcp qdio scsi_transport_fc dasd_eckd_mod dasd_mod [last unloaded: ltp_fw_load]
Oct 29 22:47:43 t35lp04 kernel: CPU: 10 PID: 93645 Comm: block_dev Tainted: G OE 4.15.0-66-generic #75-Ubuntu
Oct 29 22:47:43 t35lp04 kernel: Hardware name: IBM 8561 T01 403 (LPAR)
Oct 29 22:47:43 t35lp04 kernel: Krnl PSW : 00000000dbddaa8b 00000000a41f3293 (unregister_blkdev+0xb6/0x110)
Oct 29 22:47:43 t35lp04 kernel: R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
Oct 29 22:47:43 t35lp04 kernel: Krnl GPRS: 0000000000000800 0000000000000006 0000000000000024 0000000000000007
Oct 29 22:47:43 t35lp04 kernel: 00000000005c6672 000000007fe03000 0000000000000001 000002aa3f9de4c0
Oct 29 22:47:43 t35lp04 kernel: 00000004569dbf00 0000000000000001 000003ff800be11c 0000000000000000
Oct 29 22:47:43 t35lp04 kernel: 0000000000000000 000000000094ebb0 00000000005c6672 00000004569dbd10
Oct 29 22:47:43 t35lp04 kernel: Krnl Code: 00000000005c6666: c02000260c97 larl %r2,a87f94
00000000005c666c: c0e5ffe0f502 brasl %r14,1e5070
#00000000005c6672: a7f40001 brc 15,5c6674
>00000000005c6676: a7c90000 lghi %r12,0
00000000005c667a: a7f4001c brc 15,5c66b2
00000000005c667e: ec2c1dbc0359 risbgn %r2,%r12,29,188,3
00000000005c6684: b90400c1 lgr %r12,%r1
00000000005c6688: c010004cd4b8 larl ...

Read more...

Revision history for this message
Frank Heimes (fheimes) wrote :

Copied the bug description from comment #1 into the LP bug description field.

description: updated
Changed in ubuntu-z-systems:
importance: Undecided → Medium
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Triaged
Revision history for this message
Frank Heimes (fheimes) wrote :

Could recreate the problem - hence changing statues to Confirmed.

Changed in ubuntu-z-systems:
status: Triaged → Confirmed
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello,

This issue can be reproduced in 4.15 AMD64 generic kernels as well.

I have looked into the test case, this failure can be divided into 2 parts, the first one occurs on the fifth test case:
    Test Case 5: register_blkdev() with major=512/4294967295

Which will try to set the major number with 512 and UINT_MAX, however the major number has been limited to 511 in Bionic (BLKDEV_MAJOR_MAX - 1, commit 133d55c upstream), this operation is expected to fail.

So it's normal to see this failure:
    register_blkdev: major requested (512) is greater than the maximum (512) for ltp_block_dev

For the kernel warning, it's caused by the seventh test case:
    Test Case 7: unregister_blkdev() with major=0

It will first try to allocate any unused major number by passing major=0, and then try to unregister it with major=0 again. This is expected to fail and generates warnings as the module used here is an out-of-tree one.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Conclusion, these are the expected behaviour.

Revision history for this message
Frank Heimes (fheimes) wrote :

Thanks Po-Hsu Lin for looking into this.
I'll just remove the duplicate info, just to be able to update the status here too, so that it can be synched to IBM via the bugzilla bridge, and will mark it again as duplicate.
(of course unusual steps, but it's just to overcome a limitation in the bugzilla-LP sync mechanism ...)

Frank Heimes (fheimes)
Changed in linux (Ubuntu):
status: New → Invalid
Changed in ubuntu-z-systems:
status: Confirmed → Won't Fix
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-03-17 09:11 EDT-------
Works as designed, documented by Canonical

------- Comment From <email address hidden> 2020-03-17 09:11 EDT-------
IBM bugzilla status-> closed, Won't fix, works as designed

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.