Skip to content

unprotected object #3615

Closed
Closed

Description

@mattdowle

Fail on GLCI, likely caused by #3610

Running test id 1682.6      
Running test id 1682.7      Test 1682.7 ran without errors but failed check that x equals y:
> x = dt1[dt3, on = .(x >= V1, y <= V2), sum(z) * V3, by = .EACHI] 
    x  y V1  [Key= Types=int,int,dou Classes=int,int,num]
1: 12 15 NA                                              
2:  5  7 84                                              
> y = dt1[dt3, on = .(x >= V1, y <= V2)][, sum(z) * V3[1L], by = .(x,      y)] 
First 6 of 1 (type 'character'): [1] "Error in bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, mult,  : \n  unprotected object (0x4b03c48) encountered (was INTSXP)\n"
Error in bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, mult,  : 
  unprotected object (0x4b03c48) encountered (was INTSXP)
Calls: test.data.table ... sys.source -> eval -> eval -> [ -> [.data.table -> bmerge
Execution halted
ERROR: Job failed: exit code 1

Activity

  1. added this to the 1.12.4 milestone on May 29, 2019
  2. jangorecki commented on May 30, 2019

    @jangorecki
    Member

    found this, doesn't seems to be related to bmerge

    fmelt.c: In function ‘getvaluecols’:
    fmelt.c:487:53: warning: ‘ithisidx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                 itarget[counter + k] = ithiscol[ithisidx[k]-1];
    
  3. jangorecki commented on May 30, 2019

    @jangorecki
    Member

    looking at change in bmerge.c in #3610 I don't see anything that could be responsible for that.

  4. mattdowle commented on May 30, 2019

    @mattdowle
    MemberAuthor

    It might be that we've tickled memory / gc points around and that's revealed something that was there before. Or it might be I went too far and messed it up.
    Good find on ithisidx! Could well be something like that. I started on a local branch to pass rchk and I'll fix that in there then. Currently struggling with rchk: kalibera/rchk#17.

  5. mattdowle commented on May 30, 2019

    @mattdowle
    MemberAuthor

    Torture on 1682 yielded something in the right area (bmerge.c)

    > test(1682.1, dt1[dt2, .N, by=.EACHI, on=.(x>=V1, y<=V2)], dt1[dt2, on=.(x>=V1, y<=V2)][, .N, by=.(x,y)])
    
    
    memory.c:3640:31: runtime error: member access within null pointer of type 'struct SEXPREC'
    ASAN:DEADLYSIGNAL
    =================================================================
    ==20471==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55cc32118f84 bp 0x7ffe3c809c00 sp 0x7ffe3c809be0 T0)
    ==20471==The signal is caused by a READ memory access.
    ==20471==Hint: address points to the zero page.
        #0 0x55cc32118f83 in TYPEOF /home/mdowle/build/R-devel-strict/src/main/memory.c:3640
        #1 0x55cc320b515f in CHKVEC ../../src/include/Rinlinedfuns.h:83
        #2 0x55cc320b51da in DATAPTR ../../src/include/Rinlinedfuns.h:104
        #3 0x7f5ac7cc7a48 in bmerge_r /tmp/RtmpblrTNS/R.INSTALL4eb93aeed991/data.table/src/bmerge.c:235
        #4 0x7f5ac7cc71ac in bmerge /tmp/RtmpblrTNS/R.INSTALL4eb93aeed991/data.table/src/bmerge.c:165
        #5 0x55cc31f39624 in R_doDotCall /home/mdowle/build/R-devel-strict/src/main/dotcode.c:623
        #6 0x55cc3206559b in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:7283
        #7 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #8 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #9 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #10 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #11 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #12 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #13 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #14 0x55cc32129988 in applyMethod /home/mdowle/build/R-devel-strict/src/main/objects.c:118
        #15 0x55cc3212b143 in dispatchMethod /home/mdowle/build/R-devel-strict/src/main/objects.c:436
        #16 0x55cc3212b509 in Rf_usemethod /home/mdowle/build/R-devel-strict/src/main/objects.c:476
        #17 0x55cc3201a183 in Rf_DispatchOrEval /home/mdowle/build/R-devel-strict/src/main/eval.c:3465
        #18 0x55cc322641b3 in R_DispatchOrEvalSP /home/mdowle/build/R-devel-strict/src/main/subset.c:633
        #19 0x55cc3226431f in do_subset /home/mdowle/build/R-devel-strict/src/main/subset.c:652
        #20 0x55cc32005f4a in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:695
        #21 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #22 0x55cc3201eade in FORCE_PROMISE /home/mdowle/build/R-devel-strict/src/main/eval.c:4897
        #23 0x55cc3201f3f9 in getvar /home/mdowle/build/R-devel-strict/src/main/eval.c:4970
        #24 0x55cc3202f558 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6517
        #25 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #26 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #27 0x55cc3201eade in FORCE_PROMISE /home/mdowle/build/R-devel-strict/src/main/eval.c:4897
        #28 0x55cc3201f3f9 in getvar /home/mdowle/build/R-devel-strict/src/main/eval.c:4970
        #29 0x55cc3202f558 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6517
        #30 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #31 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #32 0x55cc3201eade in FORCE_PROMISE /home/mdowle/build/R-devel-strict/src/main/eval.c:4897
        #33 0x55cc3201f3f9 in getvar /home/mdowle/build/R-devel-strict/src/main/eval.c:4970
        #34 0x55cc3202f558 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6517
        #35 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #36 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #37 0x55cc3201eade in FORCE_PROMISE /home/mdowle/build/R-devel-strict/src/main/eval.c:4897
        #38 0x55cc3201f3f9 in getvar /home/mdowle/build/R-devel-strict/src/main/eval.c:4970
        #39 0x55cc3202f558 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6517
        #40 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #41 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #42 0x55cc3201eade in FORCE_PROMISE /home/mdowle/build/R-devel-strict/src/main/eval.c:4897
        #43 0x55cc3201f3f9 in getvar /home/mdowle/build/R-devel-strict/src/main/eval.c:4970
        #44 0x55cc3202f558 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6517
        #45 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #46 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #47 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #48 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #49 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #50 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #51 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #52 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #53 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #54 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #55 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #56 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #57 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #58 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #59 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #60 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #61 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #62 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #63 0x55cc32005a81 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:643
        #64 0x55cc32012e8d in do_begin /home/mdowle/build/R-devel-strict/src/main/eval.c:2382
        #65 0x55cc32005f4a in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:695
        #66 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #67 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #68 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #69 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #70 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #71 0x55cc32005a81 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:643
        #72 0x55cc320051f5 in forcePromise /home/mdowle/build/R-devel-strict/src/main/eval.c:516
        #73 0x55cc32005a81 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:643
        #74 0x55cc32012e8d in do_begin /home/mdowle/build/R-devel-strict/src/main/eval.c:2382
        #75 0x55cc32005f4a in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:695
        #76 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #77 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #78 0x55cc320065eb in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:743
        #79 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #80 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #81 0x55cc32036882 in bcEval /home/mdowle/build/R-devel-strict/src/main/eval.c:6733
        #82 0x55cc320057b5 in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:620
        #83 0x55cc3200a9b3 in R_execClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1780
        #84 0x55cc32009e8f in Rf_applyClosure /home/mdowle/build/R-devel-strict/src/main/eval.c:1706
        #85 0x55cc320065eb in Rf_eval /home/mdowle/build/R-devel-strict/src/main/eval.c:743
        #86 0x55cc320c6a75 in Rf_ReplIteration /home/mdowle/build/R-devel-strict/src/main/main.c:260
        #87 0x55cc320c6ed2 in R_ReplConsole /home/mdowle/build/R-devel-strict/src/main/main.c:310
        #88 0x55cc320caec0 in run_Rmainloop /home/mdowle/build/R-devel-strict/src/main/main.c:1086
        #89 0x55cc320caed6 in Rf_mainloop /home/mdowle/build/R-devel-strict/src/main/main.c:1093
        #90 0x55cc31df4bd2 in main /home/mdowle/build/R-devel-strict/src/main/Rmain.c:29
        #91 0x7f5acfbafb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
        #92 0x55cc31df4a89 in _start (/home/mdowle/build/R-devel-strict/bin/exec/R+0x61da89)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV /home/mdowle/build/R-devel-strict/src/main/memory.c:3640 in TYPEOF
    ==20471==ABORTING
    
  6. jangorecki commented on May 30, 2019

    @jangorecki
    Member

    interesting to see that r-devel test job didn't catch that issue but extra test during deploy of docker image did (maybe related to running docker-in-docker)

  7. mattdowle commented on May 30, 2019

    @mattdowle
    MemberAuthor

    Yes, good test! Saved us.
    Is there a way to have a weekly GLCI job? For torture. I do that once in a blue moon currently and it takes apx 24hrs depending on the level of torture.
    rchk might have caught it too -- I'll continue on that issue to get it working for me locally again. A GLCI job which runs rchk would be great too (he has a singularity image if that helps).

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions