Fitting a SGDClassifier instance in a multi-class setting involves modifying in-place itscoef_ attribute in the workers created by a joblib.Parallel call. However, this Parallel call is not requiring shared memory. For this reason, calling SGDClassifier.fit from a context manager with a loky or a multiprocessing backend (where workers are processes, and memory is not shared) is causing a segmentation fault in the worker processes.