Skip to content

[SR-5846] Test weak-reference-racetests.swift failing on Linux/ARM #48416

Open
@swift-ci

Description

@swift-ci
Previous ID SR-5846
Radar None
Original Reporter uraimo (JIRA User)
Type Bug
Environment

Linux (Ubuntu Mate 16.04LTS) on RaspberryPi2 (armv7).

Additional Detail from JIRA
Votes 11
Component/s Compiler
Labels Bug, RunTimeCrash, Runtime, Swift4, arm, armv7
Assignee None
Priority Medium

md5: fda8e0d9115a4de24351b7ca14e2c26a

Issue Description:

I've noticed this issue while trying to build SPM with swift from the swift-4.0-branch branch on a RaspberryPi2 (swift-build-stage1 can't build the self hosted swift-build, crashing in the same way as weak-reference-racetests does). This is just one of the 16 failing tests listed in SR-5845.

This is the output of gdb when I re-run the test manually:

mainuser@justapi:~/buildSwiftOnARM/swift$ gdb --args /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/test-linux-armv7/Runtime/Output/weak-reference-racetests.swift.tmp/a.out --stdlib-unittest-in-process --stdlib-unittest-filter 'class instance property [SR-192] (copy)'
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/test-linux-armv7/Runtime/Output/weak-reference-racetests.swift.tmp/a.out...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/test-linux-armv7/Runtime/Output/weak-reference-racetests.swift.tmp/a.out --stdlib-unittest-in-process --stdlib-unittest-filter class\ instance\ property\ \[SR-192\]\ \(copy\)
Cannot parse expression `.L1185 4@r4'.
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
StdlibUnittest: using filter: class instance property [SR-192] (copy)
[ RUN ] WeakReferenceRaceTests.class instance property [SR-192] (copy)
[New Thread 0x74a47430 (LWP 29196)]
[New Thread 0x740ff430 (LWP 29197)]
[New Thread 0x738ff430 (LWP 29198)]
[New Thread 0x72eff430 (LWP 29199)]
[New Thread 0x726ff430 (LWP 29200)]
[New Thread 0x71cff430 (LWP 29201)]
[Thread 0x71cff430 (LWP 29201) exited]

Thread 2 "a.out" received signal SIGBUS, Bus error.
[Switching to Thread 0x74a47430 (LWP 29196)]
0x76edfda8 in swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::allocateSideTable() ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftCore.so
(gdb) bt
#&#8203;0 0x76edfda8 in swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::allocateSideTable() ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftCore.so
#&#8203;1 0x76edfe74 in swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::formWeakReference() ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftCore.so
#&#8203;2 0x76ec9ff4 in swift_weakAssign ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftCore.so
#&#8203;3 0x000098e8 in _T04main4WBoxCACyxGxcfc ()
#&#8203;4 0x0000984c in _T04main4WBoxCACyxGxcfC ()
#&#8203;5 0x00009cbc in _T04main29RaceTest_instancePropertyCopyV04makeB4DataAA013WeakReferencebH0CyF ()
#&#8203;6 0x00009e0c in _T04main29RaceTest_instancePropertyCopyV14StdlibUnittest0bC16WithPerTrialDataAadEP04makebL00bL0QzyFTW
()
#&#8203;7 0x769affac in _T014StdlibUnittest21_masterThreadOneTrialyAA20_RaceTestSharedStateCyxGAA0gh7WithPerF4DataRzlF0gM0QzSicfU_Tf4dg_n ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftStdlibUnittest.so
#&#8203;8 0x769bc948 in _T014StdlibUnittest21_masterThreadOneTrialyAA20_RaceTestSharedStateCyxGAA0gh7WithPerF4DataRzlF0gM0QzSicfU_TA ()
from /home/mainuser/buildSwiftOnARM/build/buildbot_linux/swift-linux-armv7/lib/swift/linux/libswiftStdlibUnittest.so

The test crashes here.

Since I've seen a few comments in the code hinting at the fact that further modifications(or improvements) to the layout of HeapObject could be needed on 32-bit platform, could this issue be related to that?

The offset used in getHeapObject() makes sense, so I guess the real culprit is somewhere else.

@gparker42 what do you suggest to look into to try to debug this further?

Metadata

Metadata

Assignees

No one assigned

    Labels

    armArchitecture: any ARMarmv7Architecture: ARMv7bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwarerun-time crashBug → crash: Swift code crashed during executionruntimeThe Swift Runtimeswift 4.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions