JSONB型の内容を参照する際にCUDA_ERROR_MISALIGNED_ADDRESS発生
Closed this issue · 2 comments
0-kaz commented
JSONB型カラムの中身を参照するクエリを実行するとエラー発生しています。
CREATE TABLE rt_jsonb_a (
id int,
v jsonb
);
INSERT INTO rt_jsonb_a (
SELECT x, ('[ ' || case when i is null then 'null' else i::text end
|| ', ' || case when f is null then 'null' else f::text end
|| ', ' || case when b is null then 'null' else b end
|| ', ' || case when s_1 is null then 'null' else s_1 end
|| ', ' || case when s_2 is null then 'null' else s_2 end
|| ']')::jsonb
FROM (SELECT x, pgstrom.random_int(2, -10000, 10000) i,
pgstrom.random_float(2,-10000.0, 10000.0)::numeric(9,3) f,
case when pgstrom.random_int(2,0,1000) < 500
then 'true'
else 'false' end b,
'"' || pgstrom.random_text_len(2,80) || '"' s_1,
'"' || pgstrom.random_text_len(2,80) || '"' s_2
FROM generate_series(1,5000) x) AS foo);
SELECT id, v->0 ival
FROM rt_jsonb_a
WHERE id > 0;
エラーメッセージ内容:
postgres=# SELECT id, v->0 ival
FROM rt_jsonb_a
WHERE id > 0;
ERROR: gpu_service.c:1997 failed on cuEventSynchronize: CUDA_ERROR_MISALIGNED_ADDRESS
HINT: device at GPU-0, function at gpuservHandleGpuTaskExec
kaigai commented
5d78419c9ef89efa8fb73bc5cbf26d759eab1131
で修正しました。
misaligned accessにならないように、わざわざチェックを入れていたのですが、
見た感じ、コンパイラが最適化で条件句を取り去ってくれやがったようです。ムキー💢
0-kaz commented
発生しないことを確認しました。ありがとうございました。