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

fatal error: MSpanList_INsert #340

Closed
parkthedavid opened this issue Nov 3, 2016 · 8 comments
Closed

fatal error: MSpanList_INsert #340

parkthedavid opened this issue Nov 3, 2016 · 8 comments

Comments

@parkthedavid
Copy link

force version v0.22.60
MacOS Sierra

on bulk query I'm getting the following error.

failed MSpanList_Insert 0x905000 0x9b51f3c97b8 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x5e5cf0, 0x10)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:530 +0x90 fp=0x7fff5fbff0b0 sp=0x7fff5fbff098
runtime.(*mSpanList).insert(0x865d08, 0x905000)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:933 +0x293 fp=0x7fff5fbff0e0 sp=0x7fff5fbff0b0
runtime.(*mheap).freeSpanLocked(0x865500, 0x905000, 0x100, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:809 +0x4be fp=0x7fff5fbff148 sp=0x7fff5fbff0e0
runtime.(*mheap).grow(0x865500, 0x8, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:675 +0x2a0 fp=0x7fff5fbff1a0 sp=0x7fff5fbff148
runtime.(*mheap).allocSpanLocked(0x865500, 0x1, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:553 +0x4e3 fp=0x7fff5fbff1f8 sp=0x7fff5fbff1a0
runtime.(*mheap).alloc_m(0x865500, 0x1, 0x15, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:437 +0x119 fp=0x7fff5fbff228 sp=0x7fff5fbff1f8
runtime.(*mheap).alloc.func1()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:502 +0x41 fp=0x7fff5fbff258 sp=0x7fff5fbff228
runtime.systemstack(0x7fff5fbff278)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:307 +0xab fp=0x7fff5fbff260 sp=0x7fff5fbff258
runtime.(*mheap).alloc(0x865500, 0x1, 0x10000000015, 0x8ccff)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:503 +0x63 fp=0x7fff5fbff2a8 sp=0x7fff5fbff260
runtime.(*mcentral).grow(0x867100, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcentral.go:209 +0x93 fp=0x7fff5fbff310 sp=0x7fff5fbff2a8
runtime.(*mcentral).cacheSpan(0x867100, 0x85fd48)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcentral.go:89 +0x47d fp=0x7fff5fbff350 sp=0x7fff5fbff310
runtime.(*mcache).refill(0x901000, 0x15, 0x7fff5fbff3b8)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcache.go:119 +0xcc fp=0x7fff5fbff388 sp=0x7fff5fbff350
runtime.mallocgc.func2()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:642 +0x2b fp=0x7fff5fbff3a8 sp=0x7fff5fbff388
runtime.systemstack(0x7fff5fbff448)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:307 +0xab fp=0x7fff5fbff3b0 sp=0x7fff5fbff3a8
runtime.mallocgc(0x180, 0x5818e0, 0x0, 0x800000000)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:643 +0x869 fp=0x7fff5fbff488 sp=0x7fff5fbff3b0
runtime.newobject(0x5818e0, 0x860210)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:781 +0x42 fp=0x7fff5fbff4b0 sp=0x7fff5fbff488
runtime.malg(0x8000, 0x8605c0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:2634 +0x27 fp=0x7fff5fbff4e8 sp=0x7fff5fbff4b0
runtime.mpreinit(0x860d80)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/os1_darwin.go:140 +0x1f fp=0x7fff5fbff500 sp=0x7fff5fbff4e8
runtime.mcommoninit(0x860d80)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:494 +0x105 fp=0x7fff5fbff548 sp=0x7fff5fbff500
runtime.schedinit()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:434 +0x79 fp=0x7fff5fbff590 sp=0x7fff5fbff548
runtime.rt0_go(0x7fff5fbff5c0, 0x5, 0x7fff5fbff5c0, 0x0, 0x5, 0x7fff5fbff790, 0x7fff5fbff796, 0x7fff5fbff79b, 0x7fff5fbff7a1, 0x7fff5fbff7b1, ...)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:138 +0x132 fp=0x7fff5fbff598 sp=0x7fff5fbff590
failed MSpanList_Insert 0x905000 0x9b51fb30ae1 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x5e5cf0, 0x10)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:530 +0x90 fp=0x7fff5fbff1d0 sp=0x7fff5fbff1b8
runtime.(*mSpanList).insert(0x865d08, 0x905000)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:933 +0x293 fp=0x7fff5fbff200 sp=0x7fff5fbff1d0
runtime.(*mheap).freeSpanLocked(0x865500, 0x905000, 0x100, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:809 +0x4be fp=0x7fff5fbff268 sp=0x7fff5fbff200
runtime.(*mheap).grow(0x865500, 0x8, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:675 +0x2a0 fp=0x7fff5fbff2c0 sp=0x7fff5fbff268
runtime.(*mheap).allocSpanLocked(0x865500, 0x1, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:553 +0x4e3 fp=0x7fff5fbff318 sp=0x7fff5fbff2c0
runtime.(*mheap).alloc_m(0x865500, 0x1, 0x15, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:437 +0x119 fp=0x7fff5fbff348 sp=0x7fff5fbff318
runtime.(*mheap).alloc.func1()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:502 +0x41 fp=0x7fff5fbff378 sp=0x7fff5fbff348
runtime.systemstack(0x7fff5fbff398)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:307 +0xab fp=0x7fff5fbff380 sp=0x7fff5fbff378
runtime.(*mheap).alloc(0x865500, 0x1, 0x10000000015, 0x8ccff)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mheap.go:503 +0x63 fp=0x7fff5fbff3c8 sp=0x7fff5fbff380
runtime.(*mcentral).grow(0x867100, 0x0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcentral.go:209 +0x93 fp=0x7fff5fbff430 sp=0x7fff5fbff3c8
runtime.(*mcentral).cacheSpan(0x867100, 0x85fd48)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcentral.go:89 +0x47d fp=0x7fff5fbff470 sp=0x7fff5fbff430
runtime.(*mcache).refill(0x901000, 0x15, 0x7fff5fbff4d8)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/mcache.go:119 +0xcc fp=0x7fff5fbff4a8 sp=0x7fff5fbff470
runtime.mallocgc.func2()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:642 +0x2b fp=0x7fff5fbff4c8 sp=0x7fff5fbff4a8
runtime.systemstack(0x7fff5fbff568)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:307 +0xab fp=0x7fff5fbff4d0 sp=0x7fff5fbff4c8
runtime.mallocgc(0x180, 0x5818e0, 0x0, 0x800000000)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:643 +0x869 fp=0x7fff5fbff5a8 sp=0x7fff5fbff4d0
runtime.newobject(0x5818e0, 0x860210)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/malloc.go:781 +0x42 fp=0x7fff5fbff5d0 sp=0x7fff5fbff5a8
runtime.malg(0x8000, 0x8605c0)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:2634 +0x27 fp=0x7fff5fbff608 sp=0x7fff5fbff5d0
runtime.mpreinit(0x860d80)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/os1_darwin.go:140 +0x1f fp=0x7fff5fbff620 sp=0x7fff5fbff608
runtime.mcommoninit(0x860d80)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:494 +0x105 fp=0x7fff5fbff668 sp=0x7fff5fbff620
runtime.schedinit()
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/proc.go:434 +0x79 fp=0x7fff5fbff6b0 sp=0x7fff5fbff668
runtime.rt0_go(0x7fff5fbff6e0, 0x4, 0x7fff5fbff6e0, 0x0, 0x4, 0x7fff5fbff8a8, 0x7fff5fbff8ae, 0x7fff5fbff8b3, 0x7fff5fbff8b9, 0x0, ...)
	/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/asm_amd64.s:138 +0x132 fp=0x7fff5fbff6b8 sp=0x7fff5fbff6b0
@dcarroll
Copy link
Contributor

dcarroll commented Nov 4, 2016

What is the context here? This is not a go force stack trace. Can you provide the command that produces this error?

@parkthedavid
Copy link
Author

@dcarroll I believe it's happening when either force bulk query status is being called.

This is the bash script. The error happens in the middle of the do loop.

declare -a a1
declare -a a2

echo "Bulk Querying Answer_Action__c"
a1=( $(force bulk query Answer_Action__c "SELECT Action_Id__c,Action_Taken__c,Answer_Metadata__c,CreatedById,CreatedDate,Employee_Email__c,Employee__c,Id,IsDeleted,LastModifiedById,LastModifiedDate,LastReferencedDate,LastViewedDate,Name,Response_Id__c,SystemModstamp,Timestamp__c FROM Answer_Action__c WHERE LastModifiedDate > "`date -v -28d +%Y-%m-%dT%H:%M:%SZ` | grep 'force bulk query') )
status_query="force bulk query status ${a1[4]} ${a1[5]}"
retrieve_query="force bulk query retrieve ${a1[10]} ${a1[11]} > ../data/Answer_Action__c_LOADFILE.csv"

a2=( $(eval $status_query | grep 'State') )
# check if state is "completed"

until [ ${a2[1]} = "Completed" ];
do
    sleep 5
    a2=( $(eval $status_query | grep 'State') )
    echo "Bulk Query "${a2[1]}
done

eval $retrieve_query

sed -i '' -e '${/^$/d;}' ../data/Answer_Action__c_LOADFILE.csv


@dcarroll
Copy link
Contributor

dcarroll commented Nov 4, 2016

But why does the stack trace have file paths to Travis? Is this part of an
CI/CD solution?

Can you execute the query through the interactive command line?

Bulk query seems to work for me, this may be an error in the bash script.

On Fri, Nov 4, 2016 at 12:43 PM, David Park [email protected]
wrote:

@dcarroll https://github.com/dcarroll I believe it's happening when
either force bulk query status is being called.

This is the bash script. The error happens in the middle of the do loop.

declare -a a1
declare -a a2

echo "Bulk Querying Answer_Action__c"
a1=( $(force bulk query Answer_Action__c "SELECT Action_Id__c,Action_Taken__c,Answer_Metadata__c,CreatedById,CreatedDate,Employee_Email__c,Employee__c,Id,IsDeleted,LastModifiedById,LastModifiedDate,LastReferencedDate,LastViewedDate,Name,Response_Id__c,SystemModstamp,Timestamp__c FROM Answer_Action__c WHERE LastModifiedDate > "date -v -28d +%Y-%m-%dT%H:%M:%SZ | grep 'force bulk query') )
status_query="force bulk query status ${a1[4]} ${a1[5]}"
retrieve_query="force bulk query retrieve ${a1[10]} ${a1[11]} > ../data/Answer_Action__c_LOADFILE.csv"

a2=( $(eval $status_query | grep 'State') )

check if state is "completed"

until [ ${a2[1]} = "Completed" ];
do
sleep 5
a2=( $(eval $status_query | grep 'State') )
echo "Bulk Query "${a2[1]}
done

eval $retrieve_query

sed -i '' -e '${/^$/d;}' ../data/Answer_Action__c_LOADFILE.csv


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#340 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAHGHo6RZNX0ckrMCa0lRyGv7eq0XiLCks5q64r-gaJpZM4KpBf0
.

Thanks,
Dave

@dcarroll
Copy link
Contributor

dcarroll commented Nov 4, 2016

So, I modified your script to work on an Account object. I have also recently refactored the bulk command to use named flags instead of positional args. If you are building from source, you can just grab the latest commit. I have not created a release on this yet as the refactoring WILL BREAK existing scripts.

declare -a a1
declare -a a2

echo "Bulk Querying Answer_Action__c"
a1=( $(force bulk -c=query -o=Account "SELECT Id, Name FROM Account" | grep 'force bulk -c=') )
echo "a1[3]=${a1[3]}"
echo "a1[4]=${a1[4]}"
status_query="force bulk -c=batch ${a1[3]} ${a1[4]}"
retrieve_query="force bulk -c=retrieve ${a1[3]} ${a1[4]} > scripttest_data_load.csv"
echo "retrieve query: $retrieve_query"
a2=( $(eval $status_query | grep 'State') )
# check if state is "completed"

until [ ${a2[1]} = "Completed" ];
do
    sleep 5
    a2=( $(eval $status_query | grep 'State') )
    echo "Bulk Query "${a2[1]}
done

eval $retrieve_query

sed -i '' -e '${/^$/d;}' scripttest_data_load.csv

@dcarroll
Copy link
Contributor

dcarroll commented Nov 4, 2016

Unfortunately, I don't have a humungous data set to try to retrieve from, so it could be massive amount of eval $status_queries that is violating some memory heap.

@cwarden
Copy link
Member

cwarden commented Nov 4, 2016

Looks like a compiler bug. Maybe this: golang/go#16570

I see the bug is occurring on MacOS Sierra, but the errors are being reported in a linux runtime?

@parkthedavid
Copy link
Author

I downloaded the source code for Force CLI and then recompiled using Go 1.7.3 and it is working without errors now.

@cwarden
Copy link
Member

cwarden commented Jan 31, 2018

Assuming fixed by go update.

(Also note that, as of v0.23.0, you use -wait with force bulk query so you don't have to poll for the job completion status.)

@cwarden cwarden closed this as completed Jan 31, 2018
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

No branches or pull requests

3 participants