Open lgbaldoni opened 7 years ago
All errors in _TestFileWritevLarge
lines 504, 511 are possible points of error
and every usage of as
.
This patch:
Index: ponyc-0.15.0/packages/files/_test.pony
===================================================================
--- ponyc-0.15.0.orig/packages/files/_test.pony
+++ ponyc-0.15.0/packages/files/_test.pony
@@ -507,11 +507,6 @@ class iso _TestFileWritevLarge is UnitTe
file.dispose()
let file2 = CreateFile(filepath) as File
count = 0
- while count < writev_batch_size do
- let fileline1 = file2.line()
- h.assert_eq[String](count.string(), consume fileline1)
- count = count + 1
- end
file2.dispose()
filepath.remove()
else
and not running make test in parallel (-j1) seems to fix this and other random segfaults. I'll leave to someone more knowledgeable to determine whether the two things are related.
the patch seems more like it is removing code that triggers the problem rather than actually fixing the issue so line 511:
let fileline1 = file2.line()
would appear to be what is throwing the error.
I do realise that, I was trying to pinpoint the problem among the lines you mentioned. But unfortunately I'm going to need more handholding on this, although I could simply disable the test and call it a day.
It might help debugging to try changing:
let fileline1 = file2.line()
to:
let fileline1 = try file2.line() else "<missing>" end
and see the output.
Done, here's the result:
**** FAILED: files/File.writevlarge
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1024) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1025) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1026) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1027) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1028) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1029) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1030) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1031) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1032) == (<missing>)
/home/abuild/rpmbuild/BUILD/ponyc-0.15.0+git681.g8b4a3e39/packages/files/_test.pony:512: Assert eq failed. Expected (1033) == (<missing>)
Okay, this is very interesting - it appears to be uncovering an actual bug on your platform in the mechanism that this test is designed to exercise. File.writev
is failing to write lines beyond the IOV_MAX
/ pony_os_writev_max
(1024).
Packaging ponyc 0.15.0 for openSUSE, PR https://github.com/ponylang/ponyc/pull/2047 solved most of the previous test problems, but the one in the subject is still lingering.
It occurs sometimes on i586 and consistently on armv7l (both using gcc7, unsure if relevant):
Is there a way to find out more about this?