I have a very long-running python script, which synchronises data across different systems. It does a lot of data retrieval, data transformation, HTTP requests, and all of that partially multithreaded.
The script sometimes produces SIGBUS / SIGILL errors and I have no clue how to handle them properly.
The program works on roughly 500 items in a threaded way. Each item is a dictionary like this.
def processing(item):
reduced_df = item['streets']
reduced_df = reduced_df[reduced_df['city'] == item['city_country']['city']].copy()
do stuff with reduced_df
preped_streets # this is the main_data_frame
items = [{
'city_country': comb,
'language': language,
'streets': preped_streets
} for comb in city_country_combinations for language in ['en','de',...]]
with pool.ThreadPool(processes=32) as pool:
pool.map(processing, items)
Now I have never encountered SIGBUS or SIGILL before, but after doing some reading I figured something this severe has got to do with the fact that I am threading here and threads are trying to access something that another thread destroyed?