Skip to content

Assertion failure when comparing INTERVAL value #7562

Closed

Description

@suyZhong

Describe the bug

The following test case crashed the monetdb server.

Reproduction steps

DROP TABLE IF EXISTS t0 CASCADE;

CREATE  TABLE  t0(c0 INTERVAL YEAR TO MONTH);
INSERT INTO t0( c0) VALUES ('2-5'); 

SELECT * FROM t0 WHERE (NOT ((t0.c0)>=('--18945599805'))); 

Expected behavior

No crash.

MonetDB release

11.52.0 (hg id: eca5d09)

Executables source

Self compiled and installed

Operating System

Ubuntu 22.04

Additional context

Build from source https://www.monetdb.org/documentation-Aug2024/dev-guide/installation-from-source/#summary

Backtrace:

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140122476131904)
    at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140122476131904) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140122476131904, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f70d14dc476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f70d14c27f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f70d14c271b in __assert_fail_base (
    fmt=0x7f70d1677130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x7f70d0ae3108 "(lng) GDK_int_min <= upcast && upcast <= (lng) GDK_int_max", 
    file=0x7f70d0ae2e48 "/app/MonetDB/sql/backends/monet5/sql_time.c", line=954, function=<optimized out>)
    at ./assert/assert.c:92
#6  0x00007f70d14d3e96 in __GI___assert_fail (
    assertion=0x7f70d0ae3108 "(lng) GDK_int_min <= upcast && upcast <= (lng) GDK_int_max", 
    file=0x7f70d0ae2e48 "/app/MonetDB/sql/backends/monet5/sql_time.c", line=954, 
    function=0x7f70d0ae36b0 <__PRETTY_FUNCTION__.9> "month_interval_str_imp") at ./assert/assert.c:101
#7  0x00007f70d089477c in month_interval_str_imp () from /usr/local/lib/libmonetdbsql-11.52.0.so.14
#8  0x00007f70d0894e6b in month_interval_str () from /usr/local/lib/libmonetdbsql-11.52.0.so.14
#9  0x00007f70d2cf874e in runMALsequence () from /usr/local/lib/libmonetdb5-11.52.0.so.35
#10 0x00007f70d2cfc75e in DFLOWworker () from /usr/local/lib/libmonetdb5-11.52.0.so.35
#11 0x00007f70d1fd66ed in thread_starter () from /usr/local/lib/libbat-11.52.0.so.28
#12 0x00007f70d152eac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#13 0x00007f70d15bfa04 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

Activity

  1. added
    bugSomething isn't working
    and removed
    needs triageTo be triaged by MonetDB team
    on Aug 15, 2024
  2. added a commit that references this issue on Aug 15, 2024
    3390d05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions