dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.44k stars 547 forks source link

Invalid index for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)) when built with SBCL 2.2.3 #1380

Open iwarford opened 2 years ago

iwarford commented 2 years ago

Bug Report

    $ pgloader --version
    pgloader version "3.6.3~devel"
    compiled with SBCL 2.2.3

I assume it's tagged as ~devel for a reason, this was built from the 3.6.3 release tarball.

LOAD FIXED
  FROM stdin
(
    "id__" from 0 for 32,
    "import__" from 32 for 15,
    "line__" from 47 for 15,
    "switch__" from 62 for 15,
    "start_date_time" from 114 for 19 [null if blanks, trim right whitespace],
    "start_date_time2" from 133 for 10 [null if blanks, trim right whitespace],
    "call_duration" from 143 for 9 [null if blanks, trim right whitespace],
    "call_source" from 152 for 15 [null if blanks, trim right whitespace],
    "call_source_q931sig_port" from 167 for 10 [null if blanks, trim right whitespace],
    "call_dest" from 177 for 15 [null if blanks, trim right whitespace],
    "unused_field_7" from 192 for 1 [null if blanks, trim right whitespace],
    "call_source_custid" from 193 for 24 [null if blanks, trim right whitespace],
    "called_party_on_dest" from 217 for 64 [null if blanks, trim right whitespace],
    "called_party_from_src" from 281 for 64 [null if blanks, trim right whitespace],
    "call_type" from 345 for 2 [null if blanks, trim right whitespace],
    "unused_field_12" from 347 for 1 [null if blanks, trim right whitespace],
    "disconnect_error_type" from 348 for 1 [null if blanks, trim right whitespace],
    "call_error" from 349 for 10 [null if blanks, trim right whitespace],
    "call_error_string" from 359 for 64 [null if blanks, trim right whitespace],
    "unused_field_16" from 423 for 1 [null if blanks, trim right whitespace],
    "unused_field_17" from 424 for 1 [null if blanks, trim right whitespace],
    "raw_ani" from 425 for 64 [null if blanks, trim right whitespace],
    "media_type" from 489 for 25 [null if blanks, trim right whitespace],
    "data_volume_tx_src" from 514 for 45 [null if blanks, trim right whitespace],
    "data_volume_tx_dst" from 559 for 45 [null if blanks, trim right whitespace],
    "cdr_seq_no" from 604 for 10 [null if blanks, trim right whitespace],
    "transcoder_id" from 614 for 10 [null if blanks, trim right whitespace],
    "callid" from 624 for 128 [null if blanks, trim right whitespace],
    "call_hold_time" from 752 for 9 [null if blanks, trim right whitespace],
    "call_source_regid" from 761 for 128 [null if blanks, trim right whitespace],
    "call_source_uport" from 889 for 10 [null if blanks, trim right whitespace],
    "call_dest_regid" from 899 for 128 [null if blanks, trim right whitespace],
    "call_dest_uport" from 1027 for 10 [null if blanks, trim right whitespace],
    "isdn_cause_code" from 1037 for 3 [null if blanks, trim right whitespace],
    "cld_pty_after_src_clng_plan" from 1040 for 64 [null if blanks, trim right whitespace],
    "call_error_dest" from 1104 for 10 [null if blanks, trim right whitespace],
    "call_error_dest_string" from 1114 for 256 [null if blanks, trim right whitespace],
    "call_error_event_string" from 1370 for 256 [null if blanks, trim right whitespace],
    "new_ani" from 1626 for 64 [null if blanks, trim right whitespace],
    "call_duration2" from 1690 for 10 [null if blanks, trim right whitespace],
    "incoming_leg_callid" from 1700 for 128 [null if blanks, trim right whitespace],
    "protocol" from 1828 for 10 [null if blanks, trim right whitespace],
    "cdr_type" from 1838 for 10 [null if blanks, trim right whitespace],
    "hunting_attempts" from 1848 for 10 [null if blanks, trim right whitespace],
    "caller_trunk_group" from 1858 for 24 [null if blanks, trim right whitespace],
    "call_pdd" from 1882 for 10 [null if blanks, trim right whitespace],
    "h323_dest_ras_error" from 1892 for 10 [null if blanks, trim right whitespace],
    "h323_dest_h225_error" from 1902 for 10 [null if blanks, trim right whitespace],
    "sip_dest_respcode" from 1912 for 10 [null if blanks, trim right whitespace],
    "dest_trunk_group" from 1922 for 256 [null if blanks, trim right whitespace],
    "call_duration_fractional" from 2178 for 15 [null if blanks, trim right whitespace],
    "timezone" from 2193 for 20 [null if blanks, trim right whitespace],
    "msw_name" from 2213 for 256 [null if blanks, trim right whitespace],
    "cld_party_after_transit_route" from 2469 for 64 [null if blanks, trim right whitespace],
    "called_party_on_dest_num_type" from 2533 for 10 [null if blanks, trim right whitespace],
    "called_party_from_src_num_type" from 2543 for 10 [null if blanks, trim right whitespace],
    "call_source_realm_name" from 2553 for 64 [null if blanks, trim right whitespace],
    "call_dest_realm_name" from 2617 for 64 [null if blanks, trim right whitespace],
    "call_dest_crname" from 2681 for 64 [null if blanks, trim right whitespace],
    "call_dest_custid" from 2745 for 64 [null if blanks, trim right whitespace],
    "call_zone_data" from 2809 for 64 [null if blanks, trim right whitespace],
    "calling_party_on_dest_num_type" from 2873 for 10 [null if blanks, trim right whitespace],
    "calling_party_frm_src_num_type" from 2883 for 10 [null if blanks, trim right whitespace],
    "original_isdn_cause_code" from 2893 for 10 [null if blanks, trim right whitespace],
    "packets_received_on_src_leg" from 2903 for 10 [null if blanks, trim right whitespace],
    "packets_lost_on_src_leg" from 2913 for 10 [null if blanks, trim right whitespace],
    "packets_discarded_on_src_leg" from 2923 for 10 [null if blanks, trim right whitespace],
    "pdv_on_src_leg" from 2933 for 10 [null if blanks, trim right whitespace],
    "codec_on_src_leg" from 2943 for 64 [null if blanks, trim right whitespace],
    "latency_on_src_leg" from 3007 for 10 [null if blanks, trim right whitespace],
    "rfactor_on_src_leg" from 3017 for 10 [null if blanks, trim right whitespace],
    "packets_received_on_dest_leg" from 3027 for 10 [null if blanks, trim right whitespace],
    "packets_lost_on_dest_leg" from 3037 for 10 [null if blanks, trim right whitespace],
    "packets_discarded_on_dest_leg" from 3047 for 10 [null if blanks, trim right whitespace],
    "pdv_on_dest_leg" from 3057 for 10 [null if blanks, trim right whitespace],
    "codec_on_dest_leg" from 3067 for 64 [null if blanks, trim right whitespace],
    "latency_on_dest_leg" from 3131 for 10 [null if blanks, trim right whitespace],
    "rfactor_on_dest_leg" from 3141 for 10 [null if blanks, trim right whitespace],
    "sip_src_respcode" from 3151 for 10 [null if blanks, trim right whitespace],
    "peer_protocol" from 3161 for 10 [null if blanks, trim right whitespace],
    "src_private_ip" from 3171 for 16 [null if blanks, trim right whitespace],
    "dest_private_ip" from 3187 for 16 [null if blanks, trim right whitespace],
    "src_igrp_name" from 3203 for 32 [null if blanks, trim right whitespace],
    "dest_igrp_name" from 3235 for 32 [null if blanks, trim right whitespace],
    "diversion_info" from 3267 for 512 [null if blanks, trim right whitespace],
    "custom_contact_tag" from 3779 for 512 [null if blanks, trim right whitespace],
    "e911_call" from 4291 for 16 [null if blanks, trim right whitespace],
    "reserved_1" from 4307 for 1 [null if blanks, trim right whitespace],
    "reserved_2" from 4308 for 1 [null if blanks, trim right whitespace],
    "call_release_source" from 4309 for 16 [null if blanks, trim right whitespace],
    "hunt_attempts_inc_lcf_tries" from 4325 for 10 [null if blanks, trim right whitespace],
    "call_gapping_error" from 4335 for 10 [null if blanks, trim right whitespace],
    "error_code_in_reason_header" from 4345 for 10 [null if blanks, trim right whitespace],
    "ocl_object_type" from 4355 for 16 [null if blanks, trim right whitespace],
    "ocl_object_dtnrealmname" from 4371 for 512 [null if blanks, trim right whitespace],
    "ocl_object_dtnrealm_uport" from 4883 for 64 [null if blanks, trim right whitespace],
    "ocl_policy_name" from 4947 for 64 [null if blanks, trim right whitespace],
    "src_private_port" from 5011 for 25 [null if blanks, trim right whitespace],
    "dest_private_port" from 5036 for 25 [null if blanks, trim right whitespace],
    "src_realm_media_ip" from 5061 for 45 [null if blanks, trim right whitespace],
    "src_realm_media_port" from 5106 for 25 [null if blanks, trim right whitespace],
    "dest_realm_media_ip" from 5131 for 45 [null if blanks, trim right whitespace],
    "dest_realm_media_port" from 5176 for 25 [null if blanks, trim right whitespace],
    "src_trunk_context" from 5201 for 64 [null if blanks, trim right whitespace],
    "dst_trunk_context" from 5265 for 64 [null if blanks, trim right whitespace],
    "leg1_pcv" from 5329 for 512 [null if blanks, trim right whitespace],
    "leg2_pcv" from 5841 for 512 [null if blanks, trim right whitespace],
    "leg1_pani" from 6353 for 512 [null if blanks, trim right whitespace],
    "leg2_pani" from 6865 for 512 [null if blanks, trim right whitespace],
    "call_connect_time_ms" from 7377 for 23 [null if blanks, trim right whitespace],
    "call_end_time_ms" from 7400 for 23 [null if blanks, trim right whitespace],
    "routing_number" from 7423 for 64 [null if blanks, trim right whitespace],
    "no_of_m_lines" from 7487 for 10 [null if blanks, trim right whitespace],
    "from_uri_user_part" from 7497 for 128 [null if blanks, trim right whitespace],
    "new_from_uri_user_part" from 7625 for 128 [null if blanks, trim right whitespace],
    "paid_uri_user_part" from 7753 for 128 [null if blanks, trim right whitespace],
    "new_paid_uri_user_part" from 7881 for 128 [null if blanks, trim right whitespace],
    "privacy" from 8009 for 16 [null if blanks, trim right whitespace],
    "request_uri_user_part" from 8025 for 128 [null if blanks, trim right whitespace],
    "new_request_uri_user_part" from 8153 for 128 [null if blanks, trim right whitespace],
    "local_refer_status" from 8281 for 8 [null if blanks, trim right whitespace],
    "sip_dest_respreason" from 8289 for 64 [null if blanks, trim right whitespace],
    "sip_src_respreason" from 8353 for 64 [null if blanks, trim right whitespace],
    "charge_number" from 8417 for 32 [null if blanks, trim right whitespace],
    "charge_number_noa" from 8449 for 10 [null if blanks, trim right whitespace],
    "charge_number_npi" from 8459 for 10 [null if blanks, trim right whitespace],
    "segment_start_time_ms" from 8469 for 23 [null if blanks, trim right whitespace],
    "segment_duration_fractional" from 8492 for 15 [null if blanks, trim right whitespace],
    "leg1_loss_rate" from 8507 for 10 [null if blanks, trim right whitespace],
    "leg1_discard_rate" from 8517 for 10 [null if blanks, trim right whitespace],
    "leg1_burst_density" from 8527 for 10 [null if blanks, trim right whitespace],
    "leg1_gap_density" from 8537 for 10 [null if blanks, trim right whitespace],
    "leg1_burst_duration" from 8547 for 10 [null if blanks, trim right whitespace],
    "leg1_gap_duration" from 8557 for 10 [null if blanks, trim right whitespace],
    "leg1_round_trip_delay" from 8567 for 10 [null if blanks, trim right whitespace],
    "leg1_es_delay" from 8577 for 10 [null if blanks, trim right whitespace],
    "leg1_gmin" from 8587 for 10 [null if blanks, trim right whitespace],
    "leg1_jb_adaptive" from 8597 for 10 [null if blanks, trim right whitespace],
    "leg1_jb_rate" from 8607 for 10 [null if blanks, trim right whitespace],
    "leg1_rfactor" from 8617 for 10 [null if blanks, trim right whitespace],
    "leg1_mcq" from 8627 for 10 [null if blanks, trim right whitespace],
    "leg1_jb_nominal" from 8637 for 10 [null if blanks, trim right whitespace],
    "leg1_jb_max_delay" from 8647 for 10 [null if blanks, trim right whitespace],
    "leg1_jb_abs_max_delay" from 8657 for 10 [null if blanks, trim right whitespace],
    "leg2_loss_rate" from 8667 for 10 [null if blanks, trim right whitespace],
    "leg2_discard_rate" from 8677 for 10 [null if blanks, trim right whitespace],
    "leg2_burst_density" from 8687 for 10 [null if blanks, trim right whitespace],
    "leg2_gap_density" from 8697 for 10 [null if blanks, trim right whitespace],
    "leg2_burst_duration" from 8707 for 10 [null if blanks, trim right whitespace],
    "leg2_gap_duration" from 8717 for 10 [null if blanks, trim right whitespace],
    "leg2_round_trip_delay" from 8727 for 10 [null if blanks, trim right whitespace],
    "leg2_es_delay" from 8737 for 10 [null if blanks, trim right whitespace],
    "leg2_gmin" from 8747 for 10 [null if blanks, trim right whitespace],
    "leg2_jb_adaptive" from 8757 for 10 [null if blanks, trim right whitespace],
    "leg2_jb_rate" from 8767 for 10 [null if blanks, trim right whitespace],
    "leg2_rfactor" from 8777 for 10 [null if blanks, trim right whitespace],
    "leg2_mcq" from 8787 for 10 [null if blanks, trim right whitespace],
    "leg2_jb_nominal" from 8797 for 10 [null if blanks, trim right whitespace],
    "leg2_jb_max_delay" from 8807 for 10 [null if blanks, trim right whitespace],
    "leg2_jb_abs_max_delay" from 8817 for 10 [null if blanks, trim right whitespace],
    "reserved_for_future_use1" from 8827 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use2" from 8828 for 1 [null if blanks, trim right whitespace],
    "src_cipher_suite" from 8829 for 50 [null if blanks, trim right whitespace],
    "dest_cipher_suite" from 8879 for 50 [null if blanks, trim right whitespace],
    "src_pack_outside_replay_win" from 8929 for 10 [null if blanks, trim right whitespace],
    "src_packet_auth_failure" from 8939 for 10 [null if blanks, trim right whitespace],
    "src_packet_cipher_failure" from 8949 for 10 [null if blanks, trim right whitespace],
    "dest_pack_outside_replay_win" from 8959 for 10 [null if blanks, trim right whitespace],
    "dest_packet_auth_failure" from 8969 for 10 [null if blanks, trim right whitespace],
    "dest_packet_cipher_failure" from 8979 for 10 [null if blanks, trim right whitespace],
    "fmm_call_leg_info1" from 8989 for 255 [null if blanks, trim right whitespace],
    "fmm_call_leg_info2" from 9244 for 255 [null if blanks, trim right whitespace],
    "fmm_call_leg_info3" from 9499 for 255 [null if blanks, trim right whitespace],
    "fmm_call_leg_info4" from 9754 for 255 [null if blanks, trim right whitespace],
    "fmm_call_leg_info5" from 10009 for 255 [null if blanks, trim right whitespace],
    "fmm_call_info1" from 10264 for 255 [null if blanks, trim right whitespace],
    "fmm_call_info2" from 10519 for 255 [null if blanks, trim right whitespace],
    "fmm_call_info3" from 10774 for 255 [null if blanks, trim right whitespace],
    "fmm_call_info4" from 11029 for 255 [null if blanks, trim right whitespace],
    "fmm_call_info5" from 11284 for 255 [null if blanks, trim right whitespace],
    "embedded_dsp_insertion_reason" from 11539 for 8 [null if blanks, trim right whitespace],
    "outgoing_to_uri" from 11547 for 512 [null if blanks, trim right whitespace],
    "incoming_request_uri" from 12059 for 512 [null if blanks, trim right whitespace],
    "incoming_rsa_ip_address" from 12571 for 512 [null if blanks, trim right whitespace],
    "sbc_iserver_version" from 13083 for 512 [null if blanks, trim right whitespace],
    "outgoing_request_uri" from 13595 for 512 [null if blanks, trim right whitespace],
    "outgoing_from_uri" from 14107 for 512 [null if blanks, trim right whitespace],
    "reserved_for_future_use13" from 14619 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use14" from 14620 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use15" from 14621 for 1 [null if blanks, trim right whitespace],
    "src_policed_packets" from 14622 for 45 [null if blanks, trim right whitespace],
    "dest_policed_packets" from 14667 for 45 [null if blanks, trim right whitespace],
    "full_paid_hdr" from 14712 for 512 [null if blanks, trim right whitespace],
    "source_ptime" from 15224 for 10 [null if blanks, trim right whitespace],
    "destination_ptime" from 15234 for 10 [null if blanks, trim right whitespace],
    "fmm_call_invoked_profiles" from 15244 for 32 [null if blanks, trim right whitespace],
    "reserved_for_future_use17" from 15276 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use18" from 15277 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use19" from 15278 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use20" from 15279 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use21" from 15280 for 1 [null if blanks, trim right whitespace],
    "reserved_for_future_use22" from 15281 for 1 [null if blanks, trim right whitespace],
    "reinvite_reject_count" from 15282 for 10 [null if blanks, trim right whitespace],
    "organization_hdr" from 15292 for 128 [null if blanks, trim right whitespace],
    "sdp_media_offer_codec" from 15420 for 512 [null if blanks, trim right whitespace],
    "sdp_media_answer_codec" from 15932 for 512 [null if blanks, trim right whitespace],
    "video_cac" from 16444 for 32 [null if blanks, trim right whitespace],
    "reserved_for_future_use23" from 16476 for 1 [null if blanks, trim right whitespace],
    "msrp_datavolume_rx_src" from 16477 for 32 [null if blanks, trim right whitespace],
    "msrp_datavolume_rx_dst" from 16509 for 32 [null if blanks, trim right whitespace],
    "msrp_im_rx_src" from 16541 for 32 [null if blanks, trim right whitespace],
    "msrp_im_rx_dst" from 16573 for 32 [null if blanks, trim right whitespace],
    "msrp_file_size" from 16605 for 32 [null if blanks, trim right whitespace],
    "siprec_profile" from 16637 for 64 [null if blanks, trim right whitespace],
    "siprec_associatedcallids" from 16701 for 512 [null if blanks, trim right whitespace],
    "rs_setup_error" from 17213 for 32 [null if blanks, trim right whitespace],
    "unknown_01" from 17245 for 32 [null if blanks, trim right whitespace]
)
  INTO postgresql://.................@db078.switchmanagement.com/webcdr?genband_9_3_ep
(
    "id__",
    "import__",
    "line__",
    "switch__",
    "start_date_time",
    "start_date_time2",
    "call_duration",
    "call_source",
    "call_source_q931sig_port",
    "call_dest",
    "unused_field_7",
    "call_source_custid",
    "called_party_on_dest",
    "called_party_from_src",
    "call_type",
    "unused_field_12",
    "disconnect_error_type",
    "call_error",
    "call_error_string",
    "unused_field_16",
    "unused_field_17",
    "raw_ani",
    "media_type",
    "data_volume_tx_src",
    "data_volume_tx_dst",
    "cdr_seq_no",
    "transcoder_id",
    "callid",
    "call_hold_time",
    "call_source_regid",
    "call_source_uport",
    "call_dest_regid",
    "call_dest_uport",
    "isdn_cause_code",
    "cld_pty_after_src_clng_plan",
    "call_error_dest",
    "call_error_dest_string",
    "call_error_event_string",
    "new_ani",
    "call_duration2",
    "incoming_leg_callid",
    "protocol",
    "cdr_type",
    "hunting_attempts",
    "caller_trunk_group",
    "call_pdd",
    "h323_dest_ras_error",
    "h323_dest_h225_error",
    "sip_dest_respcode",
    "dest_trunk_group",
    "call_duration_fractional",
    "timezone",
    "msw_name",
    "cld_party_after_transit_route",
    "called_party_on_dest_num_type",
    "called_party_from_src_num_type",
    "call_source_realm_name",
    "call_dest_realm_name",
    "call_dest_crname",
    "call_dest_custid",
    "call_zone_data",
    "calling_party_on_dest_num_type",
    "calling_party_frm_src_num_type",
    "original_isdn_cause_code",
    "packets_received_on_src_leg",
    "packets_lost_on_src_leg",
    "packets_discarded_on_src_leg",
    "pdv_on_src_leg",
    "codec_on_src_leg",
    "latency_on_src_leg",
    "rfactor_on_src_leg",
    "packets_received_on_dest_leg",
    "packets_lost_on_dest_leg",
    "packets_discarded_on_dest_leg",
    "pdv_on_dest_leg",
    "codec_on_dest_leg",
    "latency_on_dest_leg",
    "rfactor_on_dest_leg",
    "sip_src_respcode",
    "peer_protocol",
    "src_private_ip",
    "dest_private_ip",
    "src_igrp_name",
    "dest_igrp_name",
    "diversion_info",
    "custom_contact_tag",
    "e911_call",
    "reserved_1",
    "reserved_2",
    "call_release_source",
    "hunt_attempts_inc_lcf_tries",
    "call_gapping_error",
    "error_code_in_reason_header",
    "ocl_object_type",
    "ocl_object_dtnrealmname",
    "ocl_object_dtnrealm_uport",
    "ocl_policy_name",
    "src_private_port",
    "dest_private_port",
    "src_realm_media_ip",
    "src_realm_media_port",
    "dest_realm_media_ip",
    "dest_realm_media_port",
    "src_trunk_context",
    "dst_trunk_context",
    "leg1_pcv",
    "leg2_pcv",
    "leg1_pani",
    "leg2_pani",
    "call_connect_time_ms",
    "call_end_time_ms",
    "routing_number",
    "no_of_m_lines",
    "from_uri_user_part",
    "new_from_uri_user_part",
    "paid_uri_user_part",
    "new_paid_uri_user_part",
    "privacy",
    "request_uri_user_part",
    "new_request_uri_user_part",
    "local_refer_status",
    "sip_dest_respreason",
    "sip_src_respreason",
    "charge_number",
    "charge_number_noa",
    "charge_number_npi",
    "segment_start_time_ms",
    "segment_duration_fractional",
    "leg1_loss_rate",
    "leg1_discard_rate",
    "leg1_burst_density",
    "leg1_gap_density",
    "leg1_burst_duration",
    "leg1_gap_duration",
    "leg1_round_trip_delay",
    "leg1_es_delay",
    "leg1_gmin",
    "leg1_jb_adaptive",
    "leg1_jb_rate",
    "leg1_rfactor",
    "leg1_mcq",
    "leg1_jb_nominal",
    "leg1_jb_max_delay",
    "leg1_jb_abs_max_delay",
    "leg2_loss_rate",
    "leg2_discard_rate",
    "leg2_burst_density",
    "leg2_gap_density",
    "leg2_burst_duration",
    "leg2_gap_duration",
    "leg2_round_trip_delay",
    "leg2_es_delay",
    "leg2_gmin",
    "leg2_jb_adaptive",
    "leg2_jb_rate",
    "leg2_rfactor",
    "leg2_mcq",
    "leg2_jb_nominal",
    "leg2_jb_max_delay",
    "leg2_jb_abs_max_delay",
    "reserved_for_future_use1",
    "reserved_for_future_use2",
    "src_cipher_suite",
    "dest_cipher_suite",
    "src_pack_outside_replay_win",
    "src_packet_auth_failure",
    "src_packet_cipher_failure",
    "dest_pack_outside_replay_win",
    "dest_packet_auth_failure",
    "dest_packet_cipher_failure",
    "fmm_call_leg_info1",
    "fmm_call_leg_info2",
    "fmm_call_leg_info3",
    "fmm_call_leg_info4",
    "fmm_call_leg_info5",
    "fmm_call_info1",
    "fmm_call_info2",
    "fmm_call_info3",
    "fmm_call_info4",
    "fmm_call_info5",
    "embedded_dsp_insertion_reason",
    "outgoing_to_uri",
    "incoming_request_uri",
    "incoming_rsa_ip_address",
    "sbc_iserver_version",
    "outgoing_request_uri",
    "outgoing_from_uri",
    "reserved_for_future_use13",
    "reserved_for_future_use14",
    "reserved_for_future_use15",
    "src_policed_packets",
    "dest_policed_packets",
    "full_paid_hdr",
    "source_ptime",
    "destination_ptime",
    "fmm_call_invoked_profiles",
    "reserved_for_future_use17",
    "reserved_for_future_use18",
    "reserved_for_future_use19",
    "reserved_for_future_use20",
    "reserved_for_future_use21",
    "reserved_for_future_use22",
    "reinvite_reject_count",
    "organization_hdr",
    "sdp_media_offer_codec",
    "sdp_media_answer_codec",
    "video_cac",
    "reserved_for_future_use23",
    "msrp_datavolume_rx_src",
    "msrp_datavolume_rx_dst",
    "msrp_im_rx_src",
    "msrp_im_rx_dst",
    "msrp_file_size",
    "siprec_profile",
    "siprec_associatedcallids",
    "rs_setup_error",
    "unknown_01"
) WITH prefetch rows = 10000;

The error seems to generate different stack traces randomly depending on where it happens.

pgloader version 3.6.3~devel
compiled with SBCL 2.2.3
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/home/swmqueue/tmp/"
mkdir -p #P"/home/swmqueue/base/import/cur/P220427194516AMA-db078.switchmanagement.com-17471-1651112657-39527821/.log-imp/"
2022-04-28T06:20:41.006000Z NOTICE Starting pgloader, log system is ready.
KABOOM!
FATAL error: Invalid index 1 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
Date/time: 2022-04-28-06:20!
An unhandled error condition has been signalled:
   Invalid index 1 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32)
                        (1)), should be a non-negative integer below 1.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10068C0003}>
0: ((FLET SB-IMPL::INSERT-AT :IN "SYS:SRC;CODE;TARGET-HASH-TABLE.LISP") 1 #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A59A03}> :LOG 1832251603 #<unavailable argument> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BD3093}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-MESSENGER logfile {1006A5BA83}>))
1: (SB-IMPL::PUTHASH/EQUAL :LOG #<unavailable argument> #<unavailable argument>)
2: (SB-KERNEL:%PUTHASH :LOG #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A59A03}> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BD3093}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-MESSENGER logfile {1006A5BA83}>))
3: ((LAMBDA NIL :IN PGLOADER::MAIN))
4: (PGLOADER.MONITOR::CALL-WITH-MONITOR #<FUNCTION (LAMBDA NIL :IN PGLOADER::MAIN) {100692535B}>)
5: (PGLOADER::MAIN ("/usr/bin/pgloader" "--debug" "--root-dir" "/home/swmqueue/base/import/cur/P220427194516AMA-db078.switchmanagement.com-17471-1651112657-39527821" "--logfile" "/home/swmqueue/base/import/cur/P220427194516AMA-db078.switchmanagement.com-17471-1651112657-39527821/.log-imp/import.log.2" "--summary" "/home/swmqueue/base/import/cur/P220427194516AMA-db078.switchmanagement.com-17471-1651112657-39527821/.log-imp/import.log.summary.2" "/home/swmqueue/base/import/cur/P220427194516AMA-db078.switchmanagement.com-17471-1651112657-39527821/.tmp/load.ctl-db078.switchmanagement.com-55465-1651126822-1101984936.2"))
6: ((LAMBDA NIL :IN "/root/rpmbuild/BUILD/pgloader-3.6.3/dumper-2SKVI5f7.lisp"))
7: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
8: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
9: (SB-IMPL::START-LISP)

FATAL: Failed to start the monitor thread.

Invalid index 2 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
pgloader version 3.6.3~devel
compiled with SBCL 2.2.3
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/home/swmqueue/tmp/"
mkdir -p #P"/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670/.log-imp/"
KABOOM!
FATAL error: Invalid index 2 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
Date/time: 2022-05-02-14:47!
An unhandled error condition has been signalled:
   Invalid index 2 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32)
                        (1)), should be a non-negative integer below 1.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10068D0003}>
0: ((FLET SB-IMPL::INSERT-AT :IN "SYS:SRC;CODE;TARGET-HASH-TABLE.LISP") 2 #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A61D73}> :LOG 1832251603 #<unavailable argument> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BD9F43}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-ME
SSENGER logfile {1006A63CD3}>))
1: (SB-IMPL::PUTHASH/EQUAL :LOG #<unavailable argument> #<unavailable argument>)
2: (SB-KERNEL:%PUTHASH :LOG #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A61D73}> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BD9F43}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-MESSENGER logfile {1006A63CD3}>))
3: (PGLOADER.MONITOR::SEND-LOG-MESSAGE :LOG "Data errors in '~a'~%" #P"/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670/")
4: ((LAMBDA NIL :IN PGLOADER::MAIN))
5: (PGLOADER.MONITOR::CALL-WITH-MONITOR #<FUNCTION (LAMBDA NIL :IN PGLOADER::MAIN) {100692538B}>)
6: (PGLOADER::MAIN ("/usr/bin/pgloader" "--debug" "--root-dir" "/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670" "--logfile" "/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670/
.log-imp/import.log.1" "--summary" "/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670/.log-imp/import.log.summary.1" "/home/swmqueue/base/import/cur/P220502103059AMA-db078.switchmanagement.com-104625-1651502878-375613670/.tmp/load.
ctl-db078.switchmanagement.com-28537-1651502879-1641261997.1"))
7: ((LAMBDA NIL :IN "/root/rpmbuild/BUILD/pgloader-3.6.3/dumper-2SKVI5f7.lisp"))
8: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
9: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
10: (SB-IMPL::START-LISP)

FATAL: Failed to start the monitor thread.

Invalid index 1 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
pgloader version 3.6.3~devel
compiled with SBCL 2.2.3
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/home/swmqueue/tmp/"
mkdir -p #P"/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.log-imp/"
2022-05-02T20:14:26.005000Z NOTICE Starting pgloader, log system is ready.
KABOOM!
FATAL error: Invalid index 1 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
Date/time: 2022-05-02-20:14!
An unhandled error condition has been signalled:
   Invalid index 1 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32)
                        (1)), should be a non-negative integer below 1.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10068C8003}>
0: ((FLET SB-IMPL::INSERT-AT :IN "SYS:SRC;CODE;TARGET-HASH-TABLE.LISP") 1 #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A59D73}> :LOG 1832251603 #<unavailable argument> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BDA4B3}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-ME
SSENGER logfile {1006A5BD13}>))
1: (SB-IMPL::PUTHASH/EQUAL :LOG #<unavailable argument> #<unavailable argument>)
2: (SB-KERNEL:%PUTHASH :LOG #<HASH-TABLE :TEST EQUAL :COUNT 1 {1006A59D73}> (#<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-STREAM-MESSENGER stdout {1006BDA4B3}> #<COM.RAVENBROOK.COMMON-LISP-LOG:TEXT-FILE-MESSENGER logfile {1006A5BD13}>))
3: (PGLOADER.PARSER:PARSE-COMMANDS-FROM-FILE #P"/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.tmp/load.ctl-db078.switchmanagement.com-27343-1651522466-386198296.1")
4: (PGLOADER:RUN-COMMANDS #P"/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.tmp/load.ctl-db078.switchmanagement.com-27343-1651522466-386198296.1" :START-LOGGER NIL :FLUSH-SUMMARY T :SUMMARY NIL :LOG-FILENAME NIL :LOG-MIN-MESS
AGES NIL :CLIENT-MIN-MESSAGES NIL)
5: (PGLOADER::PROCESS-COMMAND-FILE ("/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.tmp/load.ctl-db078.switchmanagement.com-27343-1651522466-386198296.1") :FLUSH-SUMMARY T)
6: (PGLOADER.MONITOR::CALL-WITH-MONITOR #<FUNCTION (LAMBDA NIL :IN PGLOADER::MAIN) {100691D46B}>)
7: (PGLOADER::MAIN ("/usr/bin/pgloader" "--debug" "--root-dir" "/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330" "--logfile" "/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209
330/.log-imp/import.log.1" "--summary" "/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.log-imp/import.log.summary.1" "/home/swmqueue/base/import/cur/T202205011448.CDR-db078.switchmanagement.com-104615-1651417722-1324209330/.t
mp/load.ctl-db078.switchmanagement.com-27343-1651522466-386198296.1"))
8: ((LAMBDA NIL :IN "/root/rpmbuild/BUILD/pgloader-3.6.3/dumper-2SKVI5f7.lisp"))
9: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
10: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
11: (SB-IMPL::START-LISP)

FATAL: Failed to start the monitor thread.

Invalid index 2 for (SIMPLE-ARRAY (UNSIGNED-BYTE 32) (1)), should be a non-negative integer below 1.
No data gets loaded.  pgloader crashes before any data is loaded.
I would expect there to be data loaded.  None is.

Workaround

We were able to work around this by rebuilding with SBCL 2.1.0.

pgloader version "3.6.3~devel"
compiled with SBCL 2.1.0

None of these issues occur when built with SBCL 2.1.0 at all.

hukl commented 2 years ago

Ran into the same issue on MacOS 12.5 on arm64 installed via homebrew - will attempt the install with the --head option.

dimitri commented 2 years ago

Hi, to be able to reproduce I would need the CREATE TABLE sql definition and also a sample data file, please. I tried reproducing with SBCL 2.2.6 and the load file and it just works here. That's what I have typed at the SBCL REPL:

(pgloader::compile-lisp-command
             (first (pgloader::parse-commands-from-file
                     "/Users/dim/dev/temp/pgloader/1380/1380.load")))
hukl commented 2 years ago

For what it's worth, the same database but doing the migration with the docker image actually worked. Building pgloader with brew install pgloader --head gave me a compile error right away - which gives me the sneaky suspicion that something isn't quite ready for arm64 / Apple Silicon?

hukl commented 2 years ago

I will try tomorrow to provide you a sample data set