Skip to content

Segmentation violation on Linux in R2025a #188

@duncanpo

Description

@duncanpo

In R2025a on Linux, there seems to be a library conflict related to the gRPC library, which causes MATLAB to produce a segmentation violation and crashes.
To reproduce this crash, Simulink has to be loaded. Also an OTLP gRPC exporter has to be used.

sim;   % start up simulink
exp = opentelemetry.exporters.OtlpGrpcSpanExporter;
proc = opentelemetry.sdk.trace.SimpleSpanProcessor(exp);
tp = opentelemetry.sdk.trace.TracerProvider(proc);
tr = getTracer(tp, "foo");
sp = startSpan(tr, "bar");
endSpan(sp)

A segmentation violation occurs with the following stack trace:

Stack Trace (from fault):
[  0] 0x00007f1e09d0d91a grpc_slice_unref at ??:? (in /matlab/bin/glnxa64/libmwgrpc_core.so)
[  1] 0x00007f1da2ee8758 grpc::ProtoBufferWriter::Next(void**, int*) at ??:? (in /Documents/MATLAB/Add-Ons/Toolboxes/MATLAB Interface to OpenTelemetry(3)/+libmexclass/+proxy/libopentelemetry_proto_grpc.so)
[  2] 0x00007f1da012910e google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(unsigned char*) at ??:? (in /Documents/MATLAB/Add-Ons/Toolboxes/MATLAB Interface to OpenTelemetry(3)/+libmexclass/+proxy/libopentelemetry_proto.so)
[  3] 0x00007f1da014a99b google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, google::protobuf::MessageLite const&, int, unsigned char*, google::protobuf::io::EpsCopyOutputStream*) at ??:? (in /Documents/MATLAB/Add-Ons/Toolboxes/MATLAB Interface to OpenTelemetry(3)/+libmexclass/+proxy/libopentelemetry_proto.so)
[  4] 0x00007f1da011fe1f opentelemetry::proto::collector::trace::v1::ExportTraceServiceRequest::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const at ??:? (in /Documents/MATLAB/Add-Ons/Toolboxes/MATLAB Interface to OpenTelemetry(3)/+libmexclass/+proxy/libopentelemetry_proto.so)
...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions