Skip to content

TSAN race in //tests:export_back_compat_test_cpu under free-threading #26272

Closed
@hawkinsp

Description

@hawkinsp

Description

This 313t free-threading CI run:
https://github.com/jax-ml/jax/actions/runs/13111654401/job/36576699494?pr=26261

contains this race in MLIR code:

WARNING: ThreadSanitizer: data race (pid=57866)
  Read of size 8 at 0x729000596b98 by thread T64 (mutexes: read M0):
    #0 (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo::isEqual((anonymous namespace)::ParametricStorageUniquer::HashedStorage const&, (anonymous namespace)::ParametricStorageUniquer::HashedStorage const&) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:67:18 (libjaxlib_mlir_capi.so+0x34173cb) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #1 (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo::isEqual((anonymous namespace)::ParametricStorageUniquer::LookupKey const&, (anonymous namespace)::ParametricStorageUniquer::HashedStorage const&) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:70:11 (libjaxlib_mlir_capi.so+0x34173cb)
    #2 bool llvm::DenseMapBase<llvm::DenseMap<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>, (anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>::LookupBucketFor<(anonymous namespace)::ParametricStorageUniquer::LookupKey>((anonymous namespace)::ParametricStorageUniquer::LookupKey const&, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>*&) /proc/self/cwd/external/llvm-project/llvm/include/llvm/ADT/DenseMap.h:654:11 (libjaxlib_mlir_capi.so+0x34173cb)
    #3 std::pair<llvm::DenseMapIterator<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>, false>, bool> llvm::DenseMapBase<llvm::DenseMap<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>, (anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>::insert_as<(anonymous namespace)::ParametricStorageUniquer::LookupKey>(std::pair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty>&&, (anonymous namespace)::ParametricStorageUniquer::LookupKey const&) /proc/self/cwd/external/llvm-project/llvm/include/llvm/ADT/DenseMap.h:280:9 (libjaxlib_mlir_capi.so+0x34173cb)
    #4 std::pair<llvm::detail::DenseSetImpl<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::DenseMap<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo>::Iterator, bool> llvm::detail::DenseSetImpl<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::DenseMap<(anonymous namespace)::ParametricStorageUniquer::HashedStorage, llvm::detail::DenseSetEmpty, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo, llvm::detail::DenseSetPair<(anonymous namespace)::ParametricStorageUniquer::HashedStorage>>, (anonymous namespace)::ParametricStorageUniquer::StorageKeyInfo>::insert_as<(anonymous namespace)::ParametricStorageUniquer::LookupKey>((anonymous namespace)::ParametricStorageUniquer::HashedStorage&&, (anonymous namespace)::ParametricStorageUniquer::LookupKey const&) /proc/self/cwd/external/llvm-project/llvm/include/llvm/ADT/DenseSet.h:232:19 (libjaxlib_mlir_capi.so+0x34173cb)
    #5 (anonymous namespace)::ParametricStorageUniquer::getOrCreateUnsafe((anonymous namespace)::ParametricStorageUniquer::Shard&, (anonymous namespace)::ParametricStorageUniquer::LookupKey&, llvm::function_ref<mlir::StorageUniquer::BaseStorage* ()>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:95:37 (libjaxlib_mlir_capi.so+0x3414f71) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #6 (anonymous namespace)::ParametricStorageUniquer::getOrCreate(bool, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* ()>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:140:14 (libjaxlib_mlir_capi.so+0x3414f71)
    #7 mlir::detail::StorageUniquerImpl::getOrCreate(mlir::TypeID, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* (mlir::StorageUniquer::StorageAllocator&)>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:270:27 (libjaxlib_mlir_capi.so+0x3414f71)
    #8 mlir::StorageUniquer::getParametricStorageTypeImpl(mlir::TypeID, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* (mlir::StorageUniquer::StorageAllocator&)>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:375:16 (libjaxlib_mlir_capi.so+0x3414b4f) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #9 mlir::detail::StringAttrStorage* mlir::StorageUniquer::get<mlir::detail::StringAttrStorage, llvm::StringRef, mlir::NoneType>(llvm::function_ref<void (mlir::detail::StringAttrStorage*)>, mlir::TypeID, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/Support/StorageUniquer.h:218:9 (libjaxlib_mlir_capi.so+0x33bd378) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #10 std::enable_if<!std::is_same<mlir::StringAttr::ImplType, mlir::AttributeStorage>::value, mlir::StringAttr>::type mlir::detail::AttributeUniquer::getWithTypeID<mlir::StringAttr, llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, mlir::TypeID, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/AttributeSupport.h:239:39 (libjaxlib_mlir_capi.so+0x33bd378)
    #11 mlir::StringAttr mlir::detail::AttributeUniquer::get<mlir::StringAttr, llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/AttributeSupport.h:220:12 (libjaxlib_mlir_capi.so+0x33bd378)
    #12 mlir::StringAttr mlir::detail::StorageUserBase<mlir::StringAttr, mlir::Attribute, mlir::detail::StringAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get<llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:181:12 (libjaxlib_mlir_capi.so+0x33bd378)
    #13 mlir::StringAttr::get(mlir::MLIRContext*, llvm::Twine const&) /proc/self/cwd/external/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:275:10 (libjaxlib_mlir_capi.so+0x33bd378)
    #14 mlir::Operation::setAttr(llvm::StringRef, mlir::Attribute) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/Operation.h:594:13 (libjaxlib_mlir_capi.so+0x25d0e57) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #15 mlirOperationSetAttributeByName /proc/self/cwd/external/llvm-project/mlir/lib/CAPI/IR/IR.cpp:683:15 (libjaxlib_mlir_capi.so+0x25d0e57)
    #16 (anonymous namespace)::PyOpAttributeMap::dunderSetItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&) /proc/self/cwd/external/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp:2634:5 (_mlir.so+0xc6b97) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #17 void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&)::operator()((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&) const /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:376:20 (_mlir.so+0xc7685) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #18 _object* nanobind::detail::func_create<false, true, void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), void, (anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, 0ul, 1ul, 2ul, nanobind::scope, nanobind::name, nanobind::is_method>((anonymous namespace)::PyOpAttributeMap&&, void (*)(nanobind::scope, nanobind::name, nanobind::is_method), std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*)::operator()(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*) const /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:264:13 (_mlir.so+0xc7685)
    #19 _object* nanobind::detail::func_create<false, true, void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), void, (anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, 0ul, 1ul, 2ul, nanobind::scope, nanobind::name, nanobind::is_method>((anonymous namespace)::PyOpAttributeMap&&, void (*)(nanobind::scope, nanobind::name, nanobind::is_method), std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*)::__invoke(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*) /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:219:14 (_mlir.so+0xc7685)
    #20 nanobind::detail::nb_func_vectorcall_simple(_object*, _object* const*, unsigned long, _object*) /proc/self/cwd/external/nanobind/src/nb_func.cpp:915:26 (_mlir.so+0x16e312) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #21 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x2f4627) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #22 vectorcall_unbound /__w/jax/jax/cpython/Objects/typeobject.c:2572:12 (python3.13+0x2f4627)
    #23 vectorcall_method /__w/jax/jax/cpython/Objects/typeobject.c:2603:24 (python3.13+0x2f4627)
    #24 slot_mp_ass_subscript /__w/jax/jax/cpython/Objects/typeobject.c (python3.13+0x2ff750) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #25 PyObject_SetItem /__w/jax/jax/cpython/Objects/abstract.c:232:19 (python3.13+0x1b9488) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #26 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:5777:27 (python3.13+0x3f5ddb) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #27 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #28 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #29 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #30 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x1ef440) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #31 method_vectorcall /__w/jax/jax/cpython/Objects/classobject.c:92:18 (python3.13+0x1ef440)
    #32 _PyVectorcall_Call /__w/jax/jax/cpython/Objects/call.c:273:16 (python3.13+0x1eb033) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #33 _PyObject_Call /__w/jax/jax/cpython/Objects/call.c:348:16 (python3.13+0x1eb033)
    #34 PyObject_Call /__w/jax/jax/cpython/Objects/call.c:373:12 (python3.13+0x1eb0b5) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #35 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:1355:26 (python3.13+0x3e4902) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #36 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #37 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #38 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #39 _PyObject_VectorcallDictTstate /__w/jax/jax/cpython/Objects/call.c:135:15 (python3.13+0x1e9f3d) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #40 _PyObject_Call_Prepend /__w/jax/jax/cpython/Objects/call.c:504:24 (python3.13+0x1eba37) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #41 slot_tp_call /__w/jax/jax/cpython/Objects/typeobject.c:9539:15 (python3.13+0x2f8928) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #42 _PyObject_MakeTpCall /__w/jax/jax/cpython/Objects/call.c:242:18 (python3.13+0x1ea1ac) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #43 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:166:16 (python3.13+0x1eae08) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #44 PyObject_Vectorcall /__w/jax/jax/cpython/Objects/call.c:327:12 (python3.13+0x1eae08)
    #45 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:813:23 (python3.13+0x3e271b) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #46 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #47 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #48 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #49 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x1ef38f) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #50 method_vectorcall /__w/jax/jax/cpython/Objects/classobject.c:70:20 (python3.13+0x1ef38f)
    #51 _PyVectorcall_Call /__w/jax/jax/cpython/Objects/call.c:273:16 (python3.13+0x1eb033) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #52 _PyObject_Call /__w/jax/jax/cpython/Objects/call.c:348:16 (python3.13+0x1eb033)
    #53 PyObject_Call /__w/jax/jax/cpython/Objects/call.c:373:12 (python3.13+0x1eb0b5) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #54 thread_run /__w/jax/jax/cpython/./Modules/_threadmodule.c:337:21 (python3.13+0x564a72) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #55 pythread_wrapper /__w/jax/jax/cpython/Python/thread_pthread.h:243:5 (python3.13+0x4bdd77) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)

  Previous write of size 8 at 0x729000596b98 by thread T67 (mutexes: read M0):
    #0 (anonymous namespace)::ParametricStorageUniquer::getOrCreateUnsafe((anonymous namespace)::ParametricStorageUniquer::Shard&, (anonymous namespace)::ParametricStorageUniquer::LookupKey&, llvm::function_ref<mlir::StorageUniquer::BaseStorage* ()>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:98:15 (libjaxlib_mlir_capi.so+0x3414fbe) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #1 (anonymous namespace)::ParametricStorageUniquer::getOrCreate(bool, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* ()>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:140:14 (libjaxlib_mlir_capi.so+0x3414fbe)
    #2 mlir::detail::StorageUniquerImpl::getOrCreate(mlir::TypeID, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* (mlir::StorageUniquer::StorageAllocator&)>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:270:27 (libjaxlib_mlir_capi.so+0x3414fbe)
    #3 mlir::StorageUniquer::getParametricStorageTypeImpl(mlir::TypeID, unsigned int, llvm::function_ref<bool (mlir::StorageUniquer::BaseStorage const*)>, llvm::function_ref<mlir::StorageUniquer::BaseStorage* (mlir::StorageUniquer::StorageAllocator&)>) /proc/self/cwd/external/llvm-project/mlir/lib/Support/StorageUniquer.cpp:375:16 (libjaxlib_mlir_capi.so+0x3414b4f) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #4 mlir::detail::StringAttrStorage* mlir::StorageUniquer::get<mlir::detail::StringAttrStorage, llvm::StringRef, mlir::NoneType>(llvm::function_ref<void (mlir::detail::StringAttrStorage*)>, mlir::TypeID, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/Support/StorageUniquer.h:218:9 (libjaxlib_mlir_capi.so+0x33bd378) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #5 std::enable_if<!std::is_same<mlir::StringAttr::ImplType, mlir::AttributeStorage>::value, mlir::StringAttr>::type mlir::detail::AttributeUniquer::getWithTypeID<mlir::StringAttr, llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, mlir::TypeID, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/AttributeSupport.h:239:39 (libjaxlib_mlir_capi.so+0x33bd378)
    #6 mlir::StringAttr mlir::detail::AttributeUniquer::get<mlir::StringAttr, llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/AttributeSupport.h:220:12 (libjaxlib_mlir_capi.so+0x33bd378)
    #7 mlir::StringAttr mlir::detail::StorageUserBase<mlir::StringAttr, mlir::Attribute, mlir::detail::StringAttrStorage, mlir::detail::AttributeUniquer, mlir::TypedAttr::Trait>::get<llvm::StringRef, mlir::NoneType>(mlir::MLIRContext*, llvm::StringRef&&, mlir::NoneType&&) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/StorageUniquerSupport.h:181:12 (libjaxlib_mlir_capi.so+0x33bd378)
    #8 mlir::StringAttr::get(mlir::MLIRContext*, llvm::Twine const&) /proc/self/cwd/external/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:275:10 (libjaxlib_mlir_capi.so+0x33bd378)
    #9 mlir::Operation::setAttr(llvm::StringRef, mlir::Attribute) /proc/self/cwd/external/llvm-project/mlir/include/mlir/IR/Operation.h:594:13 (libjaxlib_mlir_capi.so+0x25d0e57) (BuildId: 4a2d544bd6db4a8210062f683bf6bb298c5bbcf8)
    #10 mlirOperationSetAttributeByName /proc/self/cwd/external/llvm-project/mlir/lib/CAPI/IR/IR.cpp:683:15 (libjaxlib_mlir_capi.so+0x25d0e57)
    #11 (anonymous namespace)::PyOpAttributeMap::dunderSetItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&) /proc/self/cwd/external/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp:2634:5 (_mlir.so+0xc6b97) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #12 void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&)::operator()((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&) const /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:376:20 (_mlir.so+0xc7685) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #13 _object* nanobind::detail::func_create<false, true, void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), void, (anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, 0ul, 1ul, 2ul, nanobind::scope, nanobind::name, nanobind::is_method>((anonymous namespace)::PyOpAttributeMap&&, void (*)(nanobind::scope, nanobind::name, nanobind::is_method), std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*)::operator()(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*) const /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:264:13 (_mlir.so+0xc7685)
    #14 _object* nanobind::detail::func_create<false, true, void nanobind::cpp_function_def<(anonymous namespace)::PyOpAttributeMap, void, (anonymous namespace)::PyOpAttributeMap, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, nanobind::scope, nanobind::name, nanobind::is_method>(void ((anonymous namespace)::PyOpAttributeMap::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'((anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&), void, (anonymous namespace)::PyOpAttributeMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, mlir::python::PyAttribute const&, 0ul, 1ul, 2ul, nanobind::scope, nanobind::name, nanobind::is_method>((anonymous namespace)::PyOpAttributeMap&&, void (*)(nanobind::scope, nanobind::name, nanobind::is_method), std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, nanobind::scope const&, nanobind::name const&, nanobind::is_method const&)::'lambda'(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*)::__invoke(void*, _object**, unsigned char*, nanobind::rv_policy, nanobind::detail::cleanup_list*) /proc/self/cwd/external/nanobind/include/nanobind/nb_func.h:219:14 (_mlir.so+0xc7685)
    #15 nanobind::detail::nb_func_vectorcall_simple(_object*, _object* const*, unsigned long, _object*) /proc/self/cwd/external/nanobind/src/nb_func.cpp:915:26 (_mlir.so+0x16e312) (BuildId: 15beaf78f4e0ba2c1cb26690729f5d8e660c2f73)
    #16 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x2f4627) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #17 vectorcall_unbound /__w/jax/jax/cpython/Objects/typeobject.c:2572:12 (python3.13+0x2f4627)
    #18 vectorcall_method /__w/jax/jax/cpython/Objects/typeobject.c:2603:24 (python3.13+0x2f4627)
    #19 slot_mp_ass_subscript /__w/jax/jax/cpython/Objects/typeobject.c (python3.13+0x2ff750) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #20 PyObject_SetItem /__w/jax/jax/cpython/Objects/abstract.c:232:19 (python3.13+0x1b9488) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #21 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:5777:27 (python3.13+0x3f5ddb) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #22 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #23 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #24 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #25 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x1ef440) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #26 method_vectorcall /__w/jax/jax/cpython/Objects/classobject.c:92:18 (python3.13+0x1ef440)
    #27 _PyVectorcall_Call /__w/jax/jax/cpython/Objects/call.c:273:16 (python3.13+0x1eb033) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #28 _PyObject_Call /__w/jax/jax/cpython/Objects/call.c:348:16 (python3.13+0x1eb033)
    #29 PyObject_Call /__w/jax/jax/cpython/Objects/call.c:373:12 (python3.13+0x1eb0b5) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #30 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:1355:26 (python3.13+0x3e4902) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #31 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #32 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #33 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #34 _PyObject_VectorcallDictTstate /__w/jax/jax/cpython/Objects/call.c:135:15 (python3.13+0x1e9f3d) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #35 _PyObject_Call_Prepend /__w/jax/jax/cpython/Objects/call.c:504:24 (python3.13+0x1eba37) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #36 slot_tp_call /__w/jax/jax/cpython/Objects/typeobject.c:9539:15 (python3.13+0x2f8928) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #37 _PyObject_MakeTpCall /__w/jax/jax/cpython/Objects/call.c:242:18 (python3.13+0x1ea1ac) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #38 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:166:16 (python3.13+0x1eae08) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #39 PyObject_Vectorcall /__w/jax/jax/cpython/Objects/call.c:327:12 (python3.13+0x1eae08)
    #40 _PyEval_EvalFrameDefault /__w/jax/jax/cpython/Python/generated_cases.c.h:813:23 (python3.13+0x3e271b) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #41 _PyEval_EvalFrame /__w/jax/jax/cpython/./Include/internal/pycore_ceval.h:119:16 (python3.13+0x3de84a) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #42 _PyEval_Vector /__w/jax/jax/cpython/Python/ceval.c:1812:12 (python3.13+0x3de84a)
    #43 _PyFunction_Vectorcall /__w/jax/jax/cpython/Objects/call.c (python3.13+0x1eb3bf) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #44 _PyObject_VectorcallTstate /__w/jax/jax/cpython/./Include/internal/pycore_call.h:168:11 (python3.13+0x1ef38f) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #45 method_vectorcall /__w/jax/jax/cpython/Objects/classobject.c:70:20 (python3.13+0x1ef38f)
    #46 _PyVectorcall_Call /__w/jax/jax/cpython/Objects/call.c:273:16 (python3.13+0x1eb033) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #47 _PyObject_Call /__w/jax/jax/cpython/Objects/call.c:348:16 (python3.13+0x1eb033)
    #48 PyObject_Call /__w/jax/jax/cpython/Objects/call.c:373:12 (python3.13+0x1eb0b5) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #49 thread_run /__w/jax/jax/cpython/./Modules/_threadmodule.c:337:21 (python3.13+0x564a72) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)
    #50 pythread_wrapper /__w/jax/jax/cpython/Python/thread_pthread.h:243:5 (python3.13+0x4bdd77) (BuildId: c9937216e103905f871b62bf50b66fc5a8e96f80)

PTAL?

System info (python version, jaxlib version, accelerator, etc.)

Python 3.13t

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfree threadingIssues found in free threading builds

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions