Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite error for i386 architecture #6133

Closed
tillea opened this issue May 11, 2024 · 1 comment · Fixed by #6146
Closed

Test suite error for i386 architecture #6133

tillea opened this issue May 11, 2024 · 1 comment · Fixed by #6146

Comments

@tillea
Copy link

tillea commented May 11, 2024

Hi,

after upgrading the Debian packaged data.table to version 1.15.4 our CI tests uncovered a test error for i386 architecture. (The previously packaged version was 1.14.10 where this problem did not happened.) We are running this script in CI which for the problematic error boils down to

LC_ALL=C.UTF-8 R --no-save < tests/main.R

The issue is reported in the Debian bug tracking system and points to a complete log where you can find starting at line 908:

Fri May 10 06:13:18 2024  endian==little, sizeof(long double)==12, longdouble.digits==64, sizeof(pointer)==4, TZ==unset, Sys.timezone()=='Etc/UTC', Sys.getlocale()=='LC_CTYPE=C.UTF-8;LC_NUMERIC=C;LC_TIME=C.UTF-8;LC_COLLATE=C.UTF-8;LC_MONETARY=C.UTF-8;LC_MESSAGES=C.UTF-8;LC_PAPER=C.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C.UTF-8;LC_IDENTIFICATION=C', l10n_info()=='MBCS=TRUE; UTF-8=TRUE; Latin-1=FALSE; codeset=UTF-8', getDTthreads()=='OpenMP version (_OPENMP)==201511; omp_get_num_procs()==2; R_DATATABLE_NUM_PROCS_PERCENT==unset (default 50); R_DATATABLE_NUM_THREADS==unset; R_DATATABLE_THROTTLE==unset (default 1024); omp_get_thread_limit()==2147483647; omp_get_max_threads()==2; OMP_THREAD_LIMIT==unset; OMP_NUM_THREADS==unset; RestoreAfterFork==true; data.table is using 1 threads with throttle==1024. See ?setDTthreads.', zlibVersion()==1.3 ZLIB_VERSION==1.3
Error: 1 error(s) out of 9702. Search tests/tests.Rraw.bz2 for test number(s) 2150.025. Duration: 35.0s elapsed (34.1s cpu).
Execution halted

So the problem seems to be in inst/tests/tests/Rraw.bz2 with the according code

Sys.unsetenv("TZ")
# Notes:
#  - from v1.14.0 tz="" needed
#  - as.POSIXct puts "" on the result (testing the write.csv version here with missing tzone)
#  - Per #5866, this test is complicated by some interaction with very specific builds of R where
#    as.POSIXct() might fail for very old timestamps when 'tz=""' is used. On such systems,
#    as.POSIXct() failure means 'times' is returned as a character, hence no 'tzone' attribute.
#    fread() will also throw a warning, one substring of which will be the reproduced base R error.
test(2150.025,
     attr(fread(tmp, colClasses=list(POSIXct="times"), tz="")$times, "tzone"),
     if (is.null(base_messages$maybe_invalid_old_posixct)) "" else NULL,
     warning=base_messages$maybe_invalid_old_posixct)

As you can see on the Debian CI matrix the problem seems to exist for 32bit architectures.

I hope the log files with all installed package versions are sufficient to track down the problem.

Kind regards
Andreas.

@MichaelChirico
Copy link
Member

Looking at the log, I'm not sure this is related to the architecture:

104s Test 2150.025 produced 0 warnings but expected 1
104s Expected: datetimes before 1902 may not be accurate: warns once per session
104s Observed: 

But instead might be based on R's own configuration. I think we can work around this by triggering the R warning outside a data.table text context:

https://github.com/r-devel/r-svn/blob/f409a0bf5eef2c4b63a9ec38e9a7d348f1d835a0/src/main/datetime.c#L527-L538

That way the test will never produce the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants