Aki Tuomi
2021-Jan-16 15:18 UTC
dovecot 2.3.13 : make check FAILURE : Assert failed: buffer_append_full_file
> On 16/01/2021 16:36 J Lumby <johnlumby at hotmail.com> wrote: > > > After successfully building dovecot 2.3.13 (linux kernel 5.10.1 , > glibc-2.32 , gcc-9.3) > > make check had one failure as follows : > > test-buffer-istream.c:54: Assert failed: buffer_append_full_file(result, > TEST_FILENAME, SIZE_MAX, &error) == BUFFER_APPEND_READ_ERROR > test-buffer-istream.c:56: Assert failed: error != NULL && *error != '\0' > buffer_append_full_file .............................................. : > FAILED > > After a brief look at the referenced code in test-buffer-istream.c? ,? I > can't find out what this FAIL really means or whether it is serious. > > The assert is finding that the result of the call to > buffer_append_full_file is not BUFFER_APPEND_READ_ERROR,?? but it does > not report what the result code actually was.??? Maybe errno was > actually 0 and call succeeded??? I don't know.?? Nor can I see how to > add some code to find out. > > Can anyone offer any advice on what this means and/or how to investigate? > > Cheers,? John LumbyHi! You are running make check as root. Try running it as non-root user. Aki
J Lumby
2021-Jan-17 22:35 UTC
dovecot 2.3.13 : make check FAILURE : Assert failed: buffer_append_full_file
Thanks Aki. On 1/16/21 10:18 AM, Aki Tuomi wrote:>> On 16/01/2021 16:36 J Lumby <johnlumby at hotmail.com> wrote: >> >> >> >> make check had one failure as follows : >> >> test-buffer-istream.c:54: Assert failed: buffer_append_full_file(result, >> TEST_FILENAME, SIZE_MAX, &error) == BUFFER_APPEND_READ_ERROR >> test-buffer-istream.c:56: Assert failed: error != NULL && *error != '\0' >> buffer_append_full_file .............................................. : >> FAILED >> > Hi! > > You are running make check as root. Try running it as non-root user.You were absolutely correct with your diagnosis -? yes I was running make check as root. I did so because I run dovecot itself as root? -? as instructed by the wiki : Running Dovecot? : Starting? : "Dovecot can simply be started by running dovecot as root" And (I assume) it is best to run the make check under same userid,? i.e. root, otherwise it is not testing what will actually be running. But anyway I tried running make check under non-root and the result was much worse -?? some indeterminate FAIL much earlier : Making check in lib-ssl-iostream make[2]: Entering directory '/mnt/julywext/wextmisc/fed30GBroot/ahcombld/dovecot-2.3.13/src/lib-ssl-iostream' make? check-local make[3]: Entering directory '/mnt/julywext/wextmisc/fed30GBroot/ahcombld/dovecot-2.3.13/src/lib-ssl-iostream' for bin in test-iostream-ssl; do \ ? if ! /bin/sh ../../run-test.sh ../.. ./$bin; then exit 1; fi; \ done collect2: error: ld returned 213 exit status Failed to run: ./test-iostream-ssl I ran it with sh -x to see if it would tell me any more but all it indicated is that,?? somewhere during execution of valgrind,?? it hits this error from ld. My valgrind is the latest,?? 3.16.1, May we re-visit the FAIL I reported originally ?????? Why does it FAIL when run under userid root? I am guessing that somehow root gets a higher limit for the count parameter on read(fd , *buf , count) than non-root???? Although the man page for read() does not indicate any such distinction. Or is dovecot implementing its own user-id-specific limit? And,??? what code could I add to test-buffer-istream.c to make it print out the offending errno? Or,? perhaps easier -? is it safe to ignore this one FAIL?> > Aki > .Cheers,??? John Lumby