pequalsnp commented on issue #28959:
URL: https://github.com/apache/beam/issues/28959#issuecomment-1759962661

   I am running into the same error using `spannerio.Query`:
   
   ```
   {
   insertId: "1qg0xpqd1fse"
   labels: {4}
   logName: 
"projects/backend-core-prod/logs/dataflow.googleapis.com%2Fjob-message"
   receiveTimestamp: "2023-10-12T16:13:53.007588424Z"
   resource: {2}
   severity: "ERROR"
   textPayload: "Error message from worker: process bundle failed for 
instruction process_bundle-536767401968947855-0 using plan s01-10 : panic: 
runtime error: invalid memory address or nil pointer dereference
   Full error:
   while executing Process for Plan[s01-10]:
   1: DataSource[S[ptransform-7@localhost:12371], 0] Out:8 
Coder:W;coder-35<bytes;coder-36>!GWC 
   8: ParDo[spannerio.generatePartitionsFn] Out:[7] Sig: func(context.Context, 
[]uint8, func(spannerio.partitionedRead)) error, SideInputs: []
   7: PCollection[s01-10-pcollection-15] Out:[6]
   6: SDF.PairWithRestriction[spannerio.readBatchFn] UID:6 Out:[5]
   5: PCollection[s01-10-pcollection-18] Out:[4]
   4: SDF.SplitAndSizeRestrictions[spannerio.readBatchFn] UID:4 Out:[2]
   3: PCollection[s01-10-pcollection-25] Out:[2]
   2: DataSink[S[ptransform-8@localhost:12371]] 
Coder:W;coder-41<KV;coder-42<KV;coder-43<LP;coder-44<R[spannerio.partitionedRead]>,KV;coder-45<offsetrange.Restriction[offsetrange.Restriction;c4];coder-46,bool;coder-47>>,double;coder-48>>!GWC
        caused by:
   panic: runtime error: invalid memory address or nil pointer dereference 
goroutine 41 [running]:
   runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x65
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.callNoPanic.func1()
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/util.go:58 
+0xa5
   panic({0x2578d40, 0x4d742d0})
        runtime/panic.go:884 +0x213
   cloud.google.com/go/spanner.(*Client).BatchReadOnlyTransactionFromID(0x0, 
{{0xc000a18240, 0x3e, 0x40}, {0xc00014fc20, 0x98}, {0x358a15d0, 0xedcba123e, 
0x4da8320}})
        cloud.google.com/go/[email protected]/client.go:464 +0x5a
   
github.com/apache/beam/sdks/v2/go/pkg/beam/io/spannerio.(*readBatchFn).CreateInitialRestriction(0xc000496fe8?,
 {{{0xc000a18240, 0x3e, 0x40}, {0xc00014fc20, 0x98}, {0x358a15d0, 0xedcba123e, 
0x4da8320}}, 0xc000a7de60})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/io/spannerio/read_batch.go:70
 +0x78
   reflect.Value.call({0x2474420?, 0xc00060e680?, 0x44eb32?}, {0x3166478, 0x4}, 
{0xc00061ba28, 0x1, 0x5167f1?})
        reflect/value.go:586 +0xb0b
   reflect.Value.Call({0x2474420?, 0xc00060e680?, 0x99?}, {0xc00061ba28?, 
0xc000a3c558?, 0xc00060f300?})
        reflect/value.go:370 +0xbc
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/util/reflectx.(*reflectFunc).Call(0xc000228f30,
 {0xc0005fb500?, 0xc00017fc20?, 0x33bfd00?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/util/reflectx/call.go:87
 +0x59
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*cirInvoker).initCallFn.func7()
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/sdf_invokers_arity.go:78
 +0x38
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*cirInvoker).Invoke(0x7f38661e8458?,
 {0x34103c0?, 0xc00064e400?}, 0x299a4e0?)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/sdf_invokers.go:84
 +0x114
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*PairWithRestriction).ProcessElement(0xc000614240,
 {0x34103c0, 0xc00064e400}, 0xc0004ee5b0, {0x0, 0x0, 0x0})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/sdf.go:93 
+0x6a
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*PCollection).ProcessElement(0xc000603170?,
 {0x34103c0?, 0xc00064e400?}, 0x1?, {0x0?, 0x0?, 0x0?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/pcollection.go:100
 +0x151
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*emitValue).invoke(0xc0004ef6c0,
 {0xc00061ba10, 0x1, 0x101?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/emit.go:137
 +0x314
   
github.com/apache/beam/sdks/v2/go/pkg/beam/io/spannerio.(*generatePartitionsFn).ProcessElement(0xc0004ef420,
 {0x34103c0, 0xc00064e400}, {0xc0006900c0?, 0xc000498930?, 0x40bb05?}, 
0xc00064cc30)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/io/spannerio/generate_partitions.go:96
 +0x2ec
   
github.com/apache/beam/sdks/v2/go/pkg/beam/register.registerDoFn3x1StructWrappersAndFuncs[...].func2.1({0x4dd79b0,
 0x0, 0x0}, 0x8)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/register/register.go:3382 
+0x82
   
github.com/apache/beam/sdks/v2/go/pkg/beam/register.(*caller3x1[...]).Call3x1(0x3524800,
 {0x29b7b00, 0xc00064e400?}, {0x2412680, 0xc00061afc0?}, {0x24448e0, 
0xc00064cc30?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/register/register.go:3371 
+0xae
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*invoker).initCall.func13({0x3,
 0x1, 0x1, 0x0, 0x0}, {0x4d73bb0, 0x1, 0x1}, 0x442220?)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/fn_arity.go:109
 +0xad
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*invoker).invokeWithOpts(0xc0001508c0,
 {0x34103c0?, 0xc00064e400}, {0x3, 0x1, 0x1, 0x0, 0x0}, {0x4d73bb0, 0x1, ...}, 
...)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/fn.go:297 
+0xfec
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*ParDo).invokeProcessFn(0xc000618240,
 {0x34103c0, 0xc00064e400}, {0x3, 0x1, 0x1, 0x0, 0x0}, {0x4d73bb0, 0x1, ...}, 
...)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/pardo.go:508
 +0x2b5
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*ParDo).processSingleWindow(0xc000618240,
 0xc00069c750)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/pardo.go:194
 +0x9b
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*ParDo).processMainInput(0x0?,
 0x34103c0?)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/pardo.go:172
 +0x91
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*ParDo).ProcessElement(0xc000618240,
 {0x33bfce0?, 0xc00061adf8?}, 0xc0004efb20, {0x0, 0x0, 0x0})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/pardo.go:156
 +0x125
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*DataSource).Process.func1(0xc00061adf8,
 {0xc000499338?, 0xc00065a4f0?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/datasource.go:240
 +0x21e
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*DataSource).process(0xc00044c2c0,
 {0x34103c0, 0xc000220080}, 0xc000499628, 0xc000499608)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/datasource.go:146
 +0x4f6
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*DataSource).Process(0xc00044c2c0,
 {0x34103c0, 0xc000220080})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/datasource.go:214
 +0x226
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*Plan).Execute.func2({0x34103c0?,
 0xc000220080?})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/plan.go:151
 +0x42
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.callNoPanic({0x34103c0?,
 0xc000220080?}, 0x415d70?)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/util.go:62 
+0x6c
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/exec.(*Plan).Execute(0xc0006034d0,
 {0x34103c0, 0xc000220080}, {0xc000308b40, 0x23}, {{0x33de540?, 0xc00060eb80?}, 
{0x34b9418?, 0xc000614660?}})
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/exec/plan.go:150
 +0x3df
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness.(*control).handleInstruction(0xc0001f8000,
 {0x34102a8?, 0xc0002df200?}, 0xc0000b7f40)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/harness/harness.go:409
 +0xa37
   
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness.MainWithOptions.func4({0x34102a8?,
 0xc0002df200?}, 0xc0000f6900?)
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/harness/harness.go:195
 +0x7a
   created by 
github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness.MainWithOptions
        
github.com/apache/beam/sdks/[email protected]/go/pkg/beam/core/runtime/harness/harness.go:213
 +0xf1d
   "
   timestamp: "2023-10-12T16:13:51.268439744Z"
   }
   ```
   
   using spannerio.Read works


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to