FS#76884 - [schroot] crash: stl_vector.h: Assertion '__n < this->size()' failed.

Attached to Project: Community Packages
Opened by Simon Thiel (thielsn) - Tuesday, 20 December 2022, 08:42 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 22 December 2022, 01:00 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

schroot crashes:
> schroot
/usr/include/c++/12.2.0/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = char; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
> echo $?
134

Additional info:
* package version(s) schroot 1.6.13-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
see above
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 22 December 2022, 01:00 GMT
Reason for closing:  Fixed
Comment by Simon Thiel (thielsn) - Tuesday, 20 December 2022, 08:42 GMT
uname -a
Linux blast 6.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000 x86_64 GNU/Linux
Comment by yatli (yatli) - Tuesday, 20 December 2022, 19:41 GMT
problem fixed with this patch:

```
--- a/sbuild/sbuild-util.cc
+++ b/sbuild/sbuild-util.cc
@@ -630,7 +630,7 @@ sbuild::passwd::query_uid (uid_t uid)
::passwd *pwd_result;

while ((error = getpwuid_r(uid, this,
- &buffer[0], buffer.capacity(),
+ buffer.data(), buffer.capacity(),
&pwd_result)) == ERANGE)
{
size <<= 1;
@@ -653,7 +653,7 @@ sbuild::passwd::query_name (const char *
::passwd *pwd_result;

while ((error = getpwnam_r(name, this,
- &buffer[0], buffer.capacity(),
+ buffer.data(), buffer.capacity(),
&pwd_result)) == ERANGE)
{
size <<= 1;
@@ -739,7 +739,7 @@ sbuild::group::query_gid (gid_t gid)
::group *grp_result;

while ((error = getgrgid_r(gid, this,
- &buffer[0], buffer.capacity(),
+ buffer.data(), buffer.capacity(),
&grp_result)) == ERANGE)
{
size <<= 1;
@@ -762,7 +762,7 @@ sbuild::group::query_name (const char *n
::group *grp_result;

while ((error = getgrnam_r(name, this,
- &buffer[0], buffer.capacity(),
+ buffer.data(), buffer.capacity(),
&grp_result)) == ERANGE)
{
size <<= 1;
```
Comment by Toolybird (Toolybird) - Tuesday, 20 December 2022, 20:25 GMT
Yeah, it's the same crash as per  FS#73481 . The patch was removed in the latest update, but clearly it's still needed.

Loading...