Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934425 - net-libs/libktorrent-23.08.5 test fail if /tmp is on XFS PreallocationTest::testPreallocationMultiFileCache PreallocationTest::testPreallocationSingleFileCache
Summary: net-libs/libktorrent-23.08.5 test fail if /tmp is on XFS PreallocationTest::t...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-16 16:44 UTC by Arniii
Modified: 2024-09-04 16:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5_build/Testing/Temporary/LastTest.log (file_934425.txt,34.00 KB, text/plain)
2024-06-16 16:44 UTC, Arniii
Details
build.log (file_934425.txt,842.46 KB, text/plain)
2024-06-16 16:45 UTC, Arniii
Details
environment // profile default/linux/amd64/17.1/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3 (file_934425.txt,117.83 KB, text/plain)
2024-06-16 16:46 UTC, Arniii
Details
with updated system, in `zip -9` : build.log , testlog , environment, emerge --info, emerge -pqv libktorrent (libktorrent-23.08.5_with_updated_qt5.14.zip,61.71 KB, application/zip)
2024-07-10 21:17 UTC, Arniii
Details
with updated system and only -O0 -pipe -ggdb3 -frecord-gcc-switches, in `zip -9` : build.log , testlog , environment, emerge --info, emerge -pqv libktorrent (ggdb3_O0_libktorrent-23.08.5.zip,60.46 KB, application/zip)
2024-07-11 16:20 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-06-16 16:44:58 UTC
Created attachment 895926 [details]
/var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5_build/Testing/Temporary/LastTest.log

Relevant part of /var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5_build/Testing/Temporary/LastTest.log    :

```
----------------------------------------------------------
********* Start testing of PreallocationTest *********
Config: Using QtTest library 5.15.13, Qt 5.15.13 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 13.2.1 20240210), gentoo 2.15
PASS   : PreallocationTest::initTestCase()
FAIL!  : PreallocationTest::testPreallocationMultiFileCache() 'prealloc.bytesWritten() == multi_tor.getTotalSize()' returned FALSE. ()
   Loc: [/var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5/src/diskio/tests/preallocationtest.cpp(87)]
FAIL!  : PreallocationTest::testPreallocationSingleFileCache() 'prealloc.bytesWritten() == single_tor.getTotalSize()' returned FALSE. ()
   Loc: [/var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5/src/diskio/tests/preallocationtest.cpp(111)]
PASS   : PreallocationTest::cleanupTestCase()
Totals: 2 passed, 2 failed, 0 skipped, 0 blacklisted, 1360ms
********* Finished testing of PreallocationTest *********
<end of output>
Test time =   1.39 sec
----------------------------------------------------------
Test Failed.
"preallocationtest" end time: Jun 16 16:38 UTC
"preallocationtest" time elapsed: 00:00:01
----------------------------------------------------------
```
Comment 1 Arniii 2024-06-16 16:45:54 UTC
Created attachment 895927 [details]
build.log
Comment 2 Arniii 2024-06-16 16:46:57 UTC
Created attachment 895928 [details]
environment // profile default/linux/amd64/17.1/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3
Comment 3 Arniii 2024-06-16 16:52:39 UTC
iteration 1: IT HAPPENS when just -O0 -pipe -ggdb3 -frecord-gcc-switches
Comment 4 Andreas Sturmlechner gentoo-dev 2024-06-16 19:52:32 UTC
Interesting, I guess, but you're using old Qt 5.15.13 (not in tree anymore) and old libktorrent. Update your system and try to reproduce it with libktorrent-24.05.1.
Comment 5 Arniii 2024-07-10 21:17:19 UTC
Created attachment 897435 [details]
with updated system, in `zip -9` : build.log , testlog , environment, emerge --info, emerge -pqv libktorrent

I can reproduce with updated system on version 23.08.5

Let me check with new version.
Comment 6 Arniii 2024-07-10 21:54:20 UTC
(In reply to Andreas Sturmlechner from comment #4)
> Interesting, I guess, but you're using old Qt 5.15.13 (not in tree anymore)
> and old libktorrent. Update your system and try to reproduce it with
> libktorrent-24.05.1.

Sorry, do you mean to switch to plasma 6 ?
Comment 7 Andreas Sturmlechner gentoo-dev 2024-07-11 15:53:13 UTC
(In reply to Arniii from comment #6)
> (In reply to Andreas Sturmlechner from comment #4)
> > Interesting, I guess, but you're using old Qt 5.15.13 (not in tree anymore)
> > and old libktorrent. Update your system and try to reproduce it with
> > libktorrent-24.05.1.
> 
> Sorry, do you mean to switch to plasma 6 ?
kde-apps/libktorrent does not depend on Plasma, it can be tested independently.
Comment 8 Andreas Sturmlechner gentoo-dev 2024-07-11 16:02:04 UTC
(In reply to Arniii from comment #3)
> iteration 1: IT HAPPENS when just -O0 -pipe -ggdb3 -frecord-gcc-switches
Not reproducible here even with 23.08.5. Are you sure about your options? Latest logs still contain -flto.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-11 16:13:42 UTC
Please understand that options like LTO may affect libraries hence testing in a clean chroot and doing some work to figure out precisely what causes something is welcome.

I am happy to look into exotic issues *once they've been reduced into something reproducible*, but I can't spend time on chasing dragons.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-11 16:16:19 UTC
In this particular case, it might well depend on the filesystem PORTAGE_TMPFS resides on. But my advice above applies in general.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-11 16:16:42 UTC
*TMPDIR.
Comment 12 Arniii 2024-07-11 16:20:39 UTC
Created attachment 897447 [details]
with updated system and only -O0 -pipe -ggdb3 -frecord-gcc-switches, in `zip -9` : build.log , testlog , environment, emerge --info, emerge -pqv libktorrent

(In reply to Andreas Sturmlechner from comment #8)
> (In reply to Arniii from comment #3)
> > iteration 1: IT HAPPENS when just -O0 -pipe -ggdb3 -frecord-gcc-switches
> Not reproducible here even with 23.08.5. Are you sure about your options?
> Latest logs still contain -flto.

Here's logs with such


(In reply to Sam James from comment #9)
> Please understand that options like LTO may affect libraries hence testing
> in a clean chroot and doing some work to figure out precisely what causes
> something is welcome.
> 
> I am happy to look into exotic issues *once they've been reduced into
> something reproducible*, but I can't spend time on chasing dragons.


I'll try reproduce in clean chroot.
Comment 13 Arniii 2024-07-11 20:37:01 UTC
(In reply to Sam James from comment #10)
> In this particular case, it might well depend on the filesystem
> PORTAGE_TMPFS resides on. But my advice above applies in general.

After some researching, I've found you were right. It depends on filesystem of /tmp .

ext4  - success 

`PARTUUID=c09c8e8a-0fca-4ee9-b72a-3bebbd3625eb /tmp ext4 defaults,noatime 0 1`


tmpfs - success 
`tmpfs /tmp tmpfs rw,nosuid,nodev,size=4G,mode=1777 0 0`


btrfs - success
`PARTUUID=c774ac8a-3ccf-441f-b950-238696051d23 /tmp btrfs defaults,noatime 0 1`


xfs - fail .

Also, I've found next logs that can be produced by /var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5_build/bin/preallocationtest  -v2 -o log.txt,txt  :

from ./preallocation.log :
```
Thu Jul 11 20:32:15 2024: Tot Size : 35858964
Thu Jul 11 20:32:15 2024: Num Chunks : 137
Thu Jul 11 20:32:15 2024: Chunk Size : 262144
Thu Jul 11 20:32:15 2024: Last Size : 207380
Thu Jul 11 20:32:15 2024: Created /tmp/preallocationtest-QKlEmptorrent
Thu Jul 11 20:32:16 2024: Tot Size : 10825048
Thu Jul 11 20:32:16 2024: Num Chunks : 42
Thu Jul 11 20:32:16 2024: Chunk Size : 262144
Thu Jul 11 20:32:16 2024: Last Size : 77144
Thu Jul 11 20:32:16 2024: Created /tmp/preallocationtest-Nuvsdztorrent
Thu Jul 11 20:32:16 2024: Preallocating file /tmp/preallocationtest-QKlEmpdata/movies/aaa.avi (11438415 bytes)
Thu Jul 11 20:32:16 2024: file_size = 0
Thu Jul 11 20:32:16 2024: Preallocating file /tmp/preallocationtest-QKlEmpdata/movies/bbb.avi (9124816 bytes)
Thu Jul 11 20:32:16 2024: file_size = 0
Thu Jul 11 20:32:16 2024: Preallocating file /tmp/preallocationtest-QKlEmpdata/movies/ccc.avi (15295733 bytes)
Thu Jul 11 20:32:16 2024: file_size = 0
Thu Jul 11 20:32:16 2024: PreallocationThread has finished
Thu Jul 11 20:32:16 2024: bw: 0, ts: 35858964
Thu Jul 11 20:32:16 2024: Preallocating file /tmp/preallocationtest-Nuvsdzdata/bla.avi (10825048 bytes)
Thu Jul 11 20:32:16 2024: file_size = 0
Thu Jul 11 20:32:16 2024: PreallocationThread has finished
Thu Jul 11 20:32:16 2024: bw: 0, ts: 10825048
```

The code related that produces such is at /var/tmp/portage/net-libs/libktorrent-23.08.5/work/libktorrent-23.08.5/src/diskio/tests/preallocationtest.cpp
Comment 14 Andreas Sturmlechner gentoo-dev 2024-07-12 17:26:48 UTC
Since you've isolated this to XFS, if it is reproducible 100% also with latest 24.05.2, you can file this bug upstream (on bugs.kde.org) instead.
Comment 15 Arniii 2024-07-13 14:51:13 UTC
(In reply to Andreas Sturmlechner from comment #14)
> Since you've isolated this to XFS, if it is reproducible 100% also with
> latest 24.05.2, you can file this bug upstream (on bugs.kde.org) instead.

Reported here : https://bugs.kde.org/show_bug.cgi?id=490231
Comment 16 Arniii 2024-09-04 16:06:13 UTC
reproducible with net-libs/libktorrent-24.05.2