sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Ondrej Dubaj
Hi,

I came across a problem during mate test, where fuzzcheck ends with
segfault.
The problem appears to be only on this arches. Other architectures are
working fine.

Build here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=40950404

Log:

./fuzzcheck /builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata1.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata2.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata3.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata4.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata5.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata6.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata7.db
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata8.db
fuzzdata1.db: SQL fuzz
fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70%./fuzzcheck
/builddir/build/BUILD/sqlite-src-3310000/test/fuzzdata1.db
(sqlid=7726,dbid=1): segfault
make: *** [Makefile:1242: fuzztest] Error 1

Ondrej
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Richard Hipp-3
On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
> The problem appears to be only on this arches.

That probably means it is an EBCDIC problem.

We have no way of replicating or debugging this problem as we have no
access to an s390 machine.  Can RedHat perhaps provide one of the
SQLite developers with a temporary ssh account into an s390 machine so
that we can investigate and fix the problem?

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Richard Hipp-3
In reply to this post by Ondrej Dubaj
On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
> Hi,
>
> I came across a problem during mate test, where fuzzcheck ends with
> segfault.
> The problem appears to be only on [s390x]. Other architectures are
> working fine.

Fixed by check-in https://www.sqlite.org/src/info/04885763c4cd00cb

Thanks for the temporary SSH login!

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Stefan Brüns
On Dienstag, 28. Januar 2020 16:16:01 CET Richard Hipp wrote:

> On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
> > Hi,
> >
> > I came across a problem during mate test, where fuzzcheck ends with
> > segfault.
> > The problem appears to be only on [s390x]. Other architectures are
> > working fine.
>
> Fixed by check-in https://www.sqlite.org/src/info/04885763c4cd00cb
>
> Thanks for the temporary SSH login!

We were seeing the problem also on other ppc64BE:

ppc64 (big endian):
fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70%./fuzzcheck /home/abuild/rpmbuild/
BUILD/sqlite-src-3310100/test/fuzzdata1.db (sqlid=7726,dbid=1): segfault

The issue is cured with the fix, but we still see 3 failing tests with fts4/
fts5:

! fts5matchinfo-15.1 expected: [X'02000000']
! fts5matchinfo-15.1 got:      [X'00000002']
! fts5matchinfo-15.2 expected: [X'02000000']
! fts5matchinfo-15.2 got:      [X'00000002']
! fts4aa-6.10 expected:
[X'0200000000000000000000000E0000000E00000001000000010000000100000001000000']
! fts4aa-6.10 got:      
[X'0000000200000000000000000000000E0000000E00000001000000010000000100000001']

SQLite 2020-01-27 19:55:54
3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1
3 errors out of 294433 tests on obs-power8-05 Linux 64-bit big-endian
!Failures on these tests: fts5matchinfo-15.1 fts5matchinfo-15.2 fts4aa-6.10

SQLite 2020-01-27 19:55:54
3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1
3 errors out of 294121 tests on obs-power8-05 Linux 32-bit big-endian
!Failures on these tests: fts5matchinfo-15.1 fts5matchinfo-15.2 fts4aa-6.10

SQLite 2020-01-27 19:55:54
3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1
3 errors out of 294433 tests on s390zp23 Linux 64-bit big-endian
!Failures on these tests: fts5matchinfo-15.1 fts5matchinfo-15.2 fts4aa-6.10


On armv7l, there is another failure in the fuzztests, with and without the
patch:
sessionfuzz-data1.db: sessionfuzz: ./sqlite3.c:57249: pager_open_journal:
Assertion `rc!=SQLITE_OK || isOpen(pPager->jfd)' failed.


Kind regards,

Stefan
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Stefan Brüns
On Dienstag, 28. Januar 2020 18:26:05 CET Brüns, Stefan wrote:

> On Dienstag, 28. Januar 2020 16:16:01 CET Richard Hipp wrote:
> > On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
> > > Hi,
> > >
> > > I came across a problem during mate test, where fuzzcheck ends with
> > > segfault.
> > > The problem appears to be only on [s390x]. Other architectures are
> > > working fine.
> >
> > Fixed by check-in https://www.sqlite.org/src/info/04885763c4cd00cb
> >
> > Thanks for the temporary SSH login!
>
> We were seeing the problem also on other ppc64BE:
>
> ppc64 (big endian):
> fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70%./fuzzcheck
> /home/abuild/rpmbuild/ BUILD/sqlite-src-3310100/test/fuzzdata1.db
> (sqlid=7726,dbid=1): segfault
>
> The issue is cured with the fix, but we still see 3 failing tests with fts4/
> fts5:
>
> ! fts5matchinfo-15.1 expected: [X'02000000']
> ! fts5matchinfo-15.1 got:      [X'00000002']
> ! fts5matchinfo-15.2 expected: [X'02000000']
> ! fts5matchinfo-15.2 got:      [X'00000002']
> ! fts4aa-6.10 expected:
> [X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'
> ] ! fts4aa-6.10 got:
> [X'0000000200000000000000000000000E0000000E00000001000000010000000100000001'
> ]

Seems to be an endianess problem, all three affected archs are big endian
(ppc32, ppc64be, s390x):

> ! fts4aa-6.10 expected:
> [X'02000000 00000000 00000000 0E000000 0E000000 01000000 01000000 01000000
01000000'
> ] ! fts4aa-6.10 got:
> [X'00000002 00000000 00000000 0000000E 0000000E 00000001 00000001 00000001
00000001'
> ]

This is 3.31.1, btw.

Kind regards, Stefan
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Richard Hipp-3
Please retry using this check-in:
https://www.sqlite.org/src/info/b20503aaf5b6595a

On 1/28/20, Brüns, Stefan <[hidden email]> wrote:

> On Dienstag, 28. Januar 2020 18:26:05 CET Brüns, Stefan wrote:
>> On Dienstag, 28. Januar 2020 16:16:01 CET Richard Hipp wrote:
>> > On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
>> > > Hi,
>> > >
>> > > I came across a problem during mate test, where fuzzcheck ends with
>> > > segfault.
>> > > The problem appears to be only on [s390x]. Other architectures are
>> > > working fine.
>> >
>> > Fixed by check-in https://www.sqlite.org/src/info/04885763c4cd00cb
>> >
>> > Thanks for the temporary SSH login!
>>
>> We were seeing the problem also on other ppc64BE:
>>
>> ppc64 (big endian):
>> fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70%./fuzzcheck
>> /home/abuild/rpmbuild/ BUILD/sqlite-src-3310100/test/fuzzdata1.db
>> (sqlid=7726,dbid=1): segfault
>>
>> The issue is cured with the fix, but we still see 3 failing tests with
>> fts4/
>> fts5:
>>
>> ! fts5matchinfo-15.1 expected: [X'02000000']
>> ! fts5matchinfo-15.1 got:      [X'00000002']
>> ! fts5matchinfo-15.2 expected: [X'02000000']
>> ! fts5matchinfo-15.2 got:      [X'00000002']
>> ! fts4aa-6.10 expected:
>> [X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'
>> ] ! fts4aa-6.10 got:
>> [X'0000000200000000000000000000000E0000000E00000001000000010000000100000001'
>> ]
>
> Seems to be an endianess problem, all three affected archs are big endian
> (ppc32, ppc64be, s390x):
>
>> ! fts4aa-6.10 expected:
>> [X'02000000 00000000 00000000 0E000000 0E000000 01000000 01000000 01000000
>>
> 01000000'
>> ] ! fts4aa-6.10 got:
>> [X'00000002 00000000 00000000 0000000E 0000000E 00000001 00000001 00000001
>>
> 00000001'
>> ]
>
> This is 3.31.1, btw.
>
> Kind regards, Stefan
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Stefan Brüns
On Mittwoch, 29. Januar 2020 13:40:44 CET Richard Hipp wrote:
> Please retry using this check-in:
> https://www.sqlite.org/src/info/b20503aaf5b6595a

The failings test now pass on all architectures:
- ix86/x86_64
- armv7hl, aarch64
- ppc32be, ppc64be, ppc64le
- s390x

Kind regards,

Stefan

> On 1/28/20, Brüns, Stefan <[hidden email]> wrote:
> > On Dienstag, 28. Januar 2020 18:26:05 CET Brüns, Stefan wrote:
> >> On Dienstag, 28. Januar 2020 16:16:01 CET Richard Hipp wrote:
> >> > On 1/27/20, Ondrej Dubaj <[hidden email]> wrote:
> >> > > Hi,
> >> > >
> >> > > I came across a problem during mate test, where fuzzcheck ends with
> >> > > segfault.
> >> > > The problem appears to be only on [s390x]. Other architectures are
> >> > > working fine.
> >> >
> >> > Fixed by check-in https://www.sqlite.org/src/info/04885763c4cd00cb
> >> >
> >> > Thanks for the temporary SSH login!
> >>
> >> We were seeing the problem also on other ppc64BE:
> >>
> >> ppc64 (big endian):
> >> fuzzdata1.db: 0% 10% 20% 30% 40% 50% 60% 70%./fuzzcheck
> >> /home/abuild/rpmbuild/ BUILD/sqlite-src-3310100/test/fuzzdata1.db
> >> (sqlid=7726,dbid=1): segfault
> >>
> >> The issue is cured with the fix, but we still see 3 failing tests with
> >> fts4/
> >> fts5:
> >>
> >> ! fts5matchinfo-15.1 expected: [X'02000000']
> >> ! fts5matchinfo-15.1 got:      [X'00000002']
> >> ! fts5matchinfo-15.2 expected: [X'02000000']
> >> ! fts5matchinfo-15.2 got:      [X'00000002']
> >> ! fts4aa-6.10 expected:
> >> [X'0200000000000000000000000E0000000E000000010000000100000001000000010000
> >> 00' ] ! fts4aa-6.10 got:
> >> [X'0000000200000000000000000000000E0000000E000000010000000100000001000000
> >> 01' ]
[...]
> >
> > This is 3.31.1, btw.
> >

--
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sqlite-3.31.0 segfaults on fuzzcheck on s390x architectures

Stefan Brüns
In reply to this post by Stefan Brüns
On Dienstag, 28. Januar 2020 18:26:05 CET Brüns, Stefan wrote:
>
> On armv7l, there is another failure in the fuzztests, with and without the
> patch:
> sessionfuzz-data1.db: sessionfuzz: ./sqlite3.c:57249: pager_open_journal:
> Assertion `rc!=SQLITE_OK || isOpen(pPager->jfd)' failed.

I had previously overlooked this, but the fuzz check also fails on ppc32be,
but passes on i586 (and all tried 64bit archs).

Kind regards,

Stefan

--
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

signature.asc (201 bytes) Download Attachment