Issue2651

classification
Title: Travis Builds failing with *** buffer overflow detected ***
Type: crash Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: pending Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: adamburke, jamesmudd, jeff.allen
Priority: Keywords:

Created on 2017-12-18.08:56:51 by jamesmudd, last changed 2019-08-17.16:13:41 by jeff.allen.

Files
File name Uploaded Description Edit Remove
Build642_log.txt jamesmudd, 2017-12-18.08:56:44 Travis console log
Messages
msg11692 (view) Author: James Mudd (jamesmudd) Date: 2017-12-18.08:56:44
Recently I have noticed quite a few Travis CI builds failing with this error: *** buffer overflow detected ***: /usr/lib/jvm/java-7-openjdk-amd64/bin/java

An example is: https://travis-ci.org/jythontools/jython/jobs/313613197#L728

This only seems to be affecting openjdk7 builds.

Attached the Travis output log.
msg12536 (view) Author: Adam Burke (adamburke) Date: 2019-05-24.06:19:48
Still happening periodically. As before, failure happens in test_builtin.

Have just run a test locally on windows on open JDK 7 without seeing a failure. May be Linux build specific. 

Test run:

REM Try to reproduce test_builtin crash on JDK 7

FOR /L %%A IN (1,1,200) DO (
    echo %%A
    dist\bin\jython.exe  -m test.regrtest --verbose  test_grammar test_opcodes test_dict test_builtin
)
msg12538 (view) Author: Adam Burke (adamburke) Date: 2019-05-24.06:20:55
== 2.7.2a1+ (, May 24 2019, 14:21:32)
== [OpenJDK Client VM (Oracle Corporation)]
== platform: java1.7.0_75
== encodings: stdin=cp850, stdout=cp850, FS=utf-8
== locale: default=('en_AU', 'windows-1252'), actual=(None, None)

1.7.0_75 was the latest binary I could find in the openjdk7 windows series.
msg12540 (view) Author: Adam Burke (adamburke) Date: 2019-05-24.07:27:07
PR https://github.com/jythontools/jython/pull/145
msg12542 (view) Author: Adam Burke (adamburke) Date: 2019-05-24.07:27:31
In both the recent
https://travis-ci.org/jythontools/jython/jobs/535576706

and original 

https://travis-ci.org/jythontools/jython/jobs/313613197#L728

we see: 

/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libnet.so(Java_java_net_Inet4AddressImpl_getLocalHostName+0x1a5)

which suggests 
https://github.com/travis-ci/travis-ci/issues/5227

... is the culprit. Also, the FTP job failure shows the following:
0.00s$ hostname
travis-job-f506d6d7-075f-46e9-a40c-7245b966dcae

... which is pretty long.

The recommended fix is to use the hosts addon 
https://docs.travis-ci.com/user/hosts/

Darjus applied an early workaround to the travis config in c547fb5b96eaab78f0a8030a50f33ae68da85f04, but there is now a more standard one available, and maybe the old one doesn't work any more. Hence the PR above.
msg12632 (view) Author: Jeff Allen (jeff.allen) Date: 2019-08-17.16:13:40
Fixed at https://hg.python.org/jython/rev/ef7b8771ce6d
History
Date User Action Args
2019-08-17 16:13:41jeff.allensetstatus: open -> pending
resolution: fixed
messages: + msg12632
nosy: + jeff.allen
2019-05-24 07:27:31adamburkesetmessages: + msg12542
2019-05-24 07:27:07adamburkesetmessages: + msg12540
2019-05-24 06:20:55adamburkesetmessages: + msg12538
2019-05-24 06:19:48adamburkesetnosy: + adamburke
messages: + msg12536
2017-12-18 08:56:51jamesmuddcreate