stage1 compiler sometimes hangs
Hi Helge,
I have done a lot of work on gcc in the past month or so trying to resolve issues with LRA.
Sometimes cc1plus will hang during bootstrap. This usually occurs fairly soon after the stage1 compiler is built. Sometimes it hangs doing conf tests or building libstdc++ for stage2.
top shows hung process running at 100%.
Once a hang occurs, it seems system is more likely to hang again (i.e., the gdb trick only lasts for a few compiles before another hang occurs). Maybe hang is more likely after system has been running for sometime.
There is no output from strace if it is attached to processor.
If I attach gdb to hung process, I see cc1plus is usually in parser. If I continue process or just quit, process runs successfully to completion.
I suspect this problem is somehow related to the size of cc1plus. If I build stage1 with -O1, the problem is reduced or goes away. I've never seen a hang building stage 1 or with the stage2 compiler.
Could this be a swap problem? Or maybe trace bit gets turned on so process runs really slow?
Any other thoughts?
Dave
Signature · 1 line
John David Anglin [email protected]
Quoted 1 line · John David Anglin
Hi Helge,
Hi Dave,
Quoted 1 line
I have done a lot of work on gcc in the past month or so trying to resolve issues with LRA.
Thanks!
Quoted 11 lines
Sometimes cc1plus will hang during bootstrap. This usually occurs fairly soon after the stage1 compiler is built. Sometimes it hangs doing conf tests or building libstdc++ for stage2.
top shows hung process running at 100%.
Once a hang occurs, it seems system is more likely to hang again (i.e., the gdb trick only lasts for a few compiles before another hang occurs). Maybe hang is more likely after system has been running for sometime.
There is no output from strace if it is attached to processor.
Quoted 8 lines
If I attach gdb to hung process, I see cc1plus is usually in parser. If I continue process or just quit, process runs successfully to completion.
I suspect this problem is somehow related to the size of cc1plus. If I build stage1 with -O1, the problem is reduced or goes away. I've never seen a hang building stage 1 or with the stage2 compiler.
Could this be a swap problem? Or maybe trace bit gets turned on so process runs really slow?
I doubt that's caused by swap/trace bits.
Quoted 1 line
Any other thoughts?
Which kernel is affected?
I suspect some issue with kernel timer (and thus scheduler).
You could try reverting this patch: "parisc: Convert to generic clockevents"
https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/commit/?h=parisc-6.12-1&id=b5ff52be891347f8847872c49d7a5c2fa29400a7
Do you still need to press enter so that systemd continues boot? Might be related.
I see some 100% hangs with apt-cacher-ng (again) on one of the machines at SAP, although apt-cacher-ng has my latest patches applied.
Helge
Quoted 27 lines · Helge Deller
Quoted 1 line · John David Anglin
Hi Helge,
Hi Dave,
Quoted 1 line
I have done a lot of work on gcc in the past month or so trying to resolve issues with LRA.
Thanks!
Quoted 18 lines
Sometimes cc1plus will hang during bootstrap. This usually occurs fairly soon after the stage1 compiler is built. Sometimes it hangs doing conf tests or building libstdc++ for stage2.
top shows hung process running at 100%.
Once a hang occurs, it seems system is more likely to hang again (i.e., the gdb trick only lasts for a few compiles before another hang occurs). Maybe hang is more likely after system has been running for sometime.
There is no output from strace if it is attached to processor.
If I attach gdb to hung process, I see cc1plus is usually in parser. If I continue process or just quit, process runs successfully to completion.
I suspect this problem is somehow related to the size of cc1plus. If I build stage1 with -O1, the problem is reduced or goes away. I've never seen a hang building stage 1 or with the stage2 compiler.
Quoted 7 lines
Quoted 1 line
Could this be a swap problem? Or maybe trace bit gets turned on so process runs really slow?
I doubt that's caused by swap/trace bits.
Quoted 1 line
Any other thoughts?
Which kernel is affected?
I've seen problem with 6.10.14 and every 6.11.x build that I've tried. All my builds have generic clockevent patch installed.
Problem could go back further than 6.10.14. I wasn't doing as many gcc builds then.
Haven't tested 6.12 yet.
I've also seen problem with debian 6.11.9-parisc64. I don't think it has clockevent patch.
Quoted 4 lines
I suspect some issue with kernel timer (and thus scheduler).
You could try reverting this patch: "parisc: Convert to generic clockevents"
https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/commit/?h=parisc-6.12-1&id=b5ff52be891347f8847872c49d7a5c2fa29400a7
That's an interesting thought.
Quoted 3 lines
Do you still need to press enter so that systemd continues boot? Might be related.
Yes with 6.11.x. 6.10.14 boots normally.
Quoted 3 lines
I see some 100% hangs with apt-cacher-ng (again) on one of the machines at SAP, although apt-cacher-ng has my latest patches applied.
apt-cacher-ng is not currently installed on mx3210.
Dave
Signature · 1 line
John David Anglin [email protected]
Quoted 4 lines · John David Anglin
Quoted 3 lines
I suspect some issue with kernel timer (and thus scheduler).
You could try reverting this patch: "parisc: Convert to generic clockevents"
https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/commit/?h=parisc-6.12-1&id=b5ff52be891347f8847872c49d7a5c2fa29400a7That's an interesting thought.
There's one more unique thing about mx3210. These builds are being done on a 1 TB PCI NVME drive. I added this drive after the system boot drive failed and I had a difficult time getting a working replacement.
Dave
Signature · 1 line
John David Anglin [email protected]
mm/slab.h "unknown type name 'u128'"
hi
I am trying to compile recent >= kernel-6.12.*
with the toolchain hppa64-unknown-linux-gnu
+ binutils-v2.34.0
+ gcc-v9.3.0
The process stops with an error
In file included from mm/mempool.c:21:mm/slab.h:25:9: error: unknown type name 'u128'
25 | typedef u128 freelist_full_t;
| ^~~~where "u128" should be defined?
Is my cc too old?
Let me know
D.
Re: mm/slab.h "unknown type name 'u128'"
Quoted 8 lines · DiTBho Down in The Bunny hole
hi
I am trying to compile recent >= kernel-6.12.*
with the toolchain hppa64-unknown-linux-gnu
+ binutils-v2.34.0
+ gcc-v9.3.0The process stops with an error
Quoted 7 lines
In file included from
mm/mempool.c:21:mm/slab.h:25:9: error: unknown type name 'u128'25 | typedef u128 freelist_full_t; | ^~~~where "u128" should be defined?
Is my cc too old?
Yes. TImode is a relatively recent addition to hppa64 compiler. I know it's in gcc-12. Your binutils version is also very old.
Dave
---
John David Anglin [email protected]
Re: mm/slab.h "unknown type name 'u128'"
hi
thanks, firmware, kernel, and userland files are on a distributed pool of disks, mounted time to time to chrooted gentoo stage4 rootfs on different machines (Apple MacMini intel, but also PowerMacG5, and XEON servers). I needed a way to identify the environment provided by the chrooted rootfs, and a way to manage to check the tools versions in the ecosystem
(
with gentoo, you also have multiple gcc, both native and cross-compiler, you need to check which version is currently selected gcc-config -l
[1] aarch64-unknown-linux-gnu-6.5.0
[2] aarch64-unknown-linux-gnu-9.3.0 *
[3] armv5tel-softfloat-linux-gnueabi-6.5.0 *
[4] armv5tel-softfloat-linux-gnueabi-9.3.0
[5] armv7a-unknown-linux-gnueabihf-6.5.0
[6] armv7a-unknown-linux-gnueabihf-8.4.0
[7] armv7a-unknown-linux-gnueabihf-9.3.0 *
[8] hppa-unknown-linux-gnu-6.5.0
[9] hppa-unknown-linux-gnu-9.3.0 *
[10] hppa64-unknown-linux-gnu-6.5.0
[11] hppa64-unknown-linux-gnu-9.3.0 *
[12] i686-pc-linux-gnu-4.9.4-gnat2016
[13] i686-pc-linux-gnu-6.5.0
[14] i686-pc-linux-gnu-7.3.1-gnat2018
[15] i686-pc-linux-gnu-7.5.0
[16] i686-pc-linux-gnu-8.3.1-gnat2019
[17] i686-pc-linux-gnu-8.4.0
[18] i686-pc-linux-gnu-9.3.0
[19] i686-pc-linux-gnu-10.2.0 *
[20] mips-unknown-linux-gnu-4.1.2-legacy
[21] mips-unknown-linux-gnu-4.5.3-legacy
[22] mips-unknown-linux-gnu-6.5.0
[23] mips-unknown-linux-gnu-9.3.0 *
[24] mips64-unknown-linux-gnu-6.5.0 *
[25] mips64-unknown-linux-gnu-9.3.0
[26] mipsel-unknown-linux-gnu-6.5.0
[27] mipsel-unknown-linux-gnu-9.3.0 *
[28] mipsle-unknown-linux-gnu-4.5.3-legacy *
[29] powerpc-unknown-linux-gnu-6.5.0
[30] powerpc-unknown-linux-gnu-9.3.0 *
[31] powerpc64-unknown-linux-gnu-9.3.0 *
[32] sparc64-unknown-linux-gnu-6.5.0 *
[33] sparc64-unknown-linux-gnu-9.3.0
[34] x86_64-pc-linux-gnu-10.2.0 *
)
So, I created a "building script" that manages these checks before starting compiling stuff.
It's still beta stuff, but it's very handy, especially after months when you don't remember what you were using, on which chroot, etc, and which are the minimal requisites.
macmini2-intel kernel-6.0.2-parisc-c3750 # ./mybuild-2024 2 [step2] compiling
kernel-6.0.2(parisc/c3750)
| note: experimental, not yet booted toolchain(hppa64-unknown-linux-gnu:2.34.0/9.3.0)
-----------------------------------------------
checking myhost as qualified_host ... success checking .config ... success
checking blobs ... success
-----------------------------------------------gadget_to_do(build) ... kernel/build
cleaning ............. donegadget_to_do(clean) ... kernel/clean
building kernel ... success
-----------------------------------------------gadget_to_do(binary) ... overlay/binary gadget_to_do(sweep) ... kernel/sweepapp_body =kernel.elfapp_size =7833152 byte
app_size_max=8000000 byte
checking size ... passed gadget_to_do(binary_report) ... kernel/binary_report
At the moment, I'm compiling a new Gentoo-stage4/x86-64bit with cross-gcc-v12 and v13 for hppa64 in the list of things to be emerged.
For kernel >=6.12.* It will easy to add the "the kernel requires this gcc minimal version" constrain
echo "12.0" > profile/gcc_ver_min
and "qualified host", as this new "2024/12 rootfs" containing gcc-hppa64-v12
echo "macmini2-intel/v19.0-2024-12" > profile/qualified_host
"macmini2-intel" is a unique name within the network, associated with a static ip.
So, it's a label that identifies only a computer.
The other entry "v18.0-2024-12" identifies the rootfs.
The version comes from "gentoo portage version", the date is my build-date.
Thanks for your quick reply =)
D.
Quoted 25 lines · John David Anglin
Quoted 8 lines · DiTBho Down in The Bunny hole
hi
I am trying to compile recent >= kernel-6.12.*
with the toolchain hppa64-unknown-linux-gnu
+ binutils-v2.34.0
+ gcc-v9.3.0The process stops with an error
Quoted 7 lines
In file included from
mm/mempool.c:21:mm/slab.h:25:9: error: unknown type name 'u128'25 | typedef u128 freelist_full_t; | ^~~~where "u128" should be defined?
Is my cc too old?Yes. TImode is a relatively recent addition to hppa64 compiler. I know it's in gcc-12. Your binutils version is also very old.
Dave
---John David Anglin [email protected]