Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
21 months agoMC further cleanups (let it compile, this time)
Martin Quinson [Sat, 30 Jul 2022 23:37:40 +0000 (01:37 +0200)]
MC further cleanups (let it compile, this time)

21 months agoMC: rename a file to sort out the mess
Martin Quinson [Sat, 30 Jul 2022 22:22:41 +0000 (00:22 +0200)]
MC: rename a file to sort out the mess

21 months agoAnd now cleanup the App-side of cruft that was needed for Checker to read actor infor...
Martin Quinson [Sat, 30 Jul 2022 22:05:25 +0000 (00:05 +0200)]
And now cleanup the App-side of cruft that was needed for Checker to read actor informations

21 months agoFinally kill mc::RemoteProcess::actors(). We now communicate the data over the wire...
Martin Quinson [Sat, 30 Jul 2022 21:56:43 +0000 (23:56 +0200)]
Finally kill mc::RemoteProcess::actors(). We now communicate the data over the wire instead of reading it directly

21 months agoGive read access to a private field
Martin Quinson [Sat, 30 Jul 2022 20:48:42 +0000 (22:48 +0200)]
Give read access to a private field

21 months agoinline a function, kill a file
Martin Quinson [Sat, 30 Jul 2022 20:38:14 +0000 (22:38 +0200)]
inline a function, kill a file

21 months agoWell the last rogue call to RemoteProcess::actors() was easy actually
Martin Quinson [Sat, 30 Jul 2022 20:15:05 +0000 (22:15 +0200)]
Well the last rogue call to RemoteProcess::actors() was easy actually

21 months agotry to hide something under the rug for now
Augustin Degomme [Sat, 30 Jul 2022 18:39:13 +0000 (20:39 +0200)]
try to hide something under the rug for now

21 months agoremove useless field
Augustin Degomme [Sat, 30 Jul 2022 18:19:15 +0000 (20:19 +0200)]
remove useless field

21 months agofix build for clang <15
Augustin Degomme [Sat, 30 Jul 2022 18:18:01 +0000 (20:18 +0200)]
fix build for clang <15

21 months agoLiveness: rename graph_state -> app_state and automaton_state -> prop_state
Martin Quinson [Sat, 30 Jul 2022 16:11:44 +0000 (18:11 +0200)]
Liveness: rename graph_state -> app_state and automaton_state -> prop_state

21 months agofurther reduce the amount of call sites for RemoteProcess::actors()
Martin Quinson [Sat, 30 Jul 2022 15:11:26 +0000 (17:11 +0200)]
further reduce the amount of call sites for RemoteProcess::actors()

21 months agosmall cosmetics to not spread unrelated logic all around the file
Martin Quinson [Sat, 30 Jul 2022 14:27:59 +0000 (16:27 +0200)]
small cosmetics to not spread unrelated logic all around the file

21 months agoMC: make it clear that we only have the info about the ready-to-run actors in a given...
Martin Quinson [Sat, 30 Jul 2022 14:16:17 +0000 (16:16 +0200)]
MC: make it clear that we only have the info about the ready-to-run actors in a given mc::State

This is very similar to the exploration algorithm in Simix, but that's
still counter-intuitive when you try to understand the code.

Let's hope that writting it this way will help me not falling into
that trap anymore :)

21 months agoReduce the amount of MC locations reading the memory of the App
Martin Quinson [Sat, 30 Jul 2022 14:04:23 +0000 (16:04 +0200)]
Reduce the amount of MC locations reading the memory of the App

We still read the remote memory, but (almost) only when creating a new
State representing that state of the App. The goal is then to get
those info through message passing instead of through memory reading.
That should help reducing the bizarre things done by the MC, maybe
allowing to run the App in valgrind or so.

As a side effect, the exploration code becomes much more readable by
using the info from the mc::State instead of invocking low-level
things to retrive those info.

21 months agoignore new deprecation warning on freebsd
Augustin Degomme [Sat, 30 Jul 2022 15:00:42 +0000 (17:00 +0200)]
ignore new deprecation warning on freebsd

21 months agouse ccache for main ci build.
Augustin Degomme [Sat, 30 Jul 2022 14:29:05 +0000 (14:29 +0000)]
use ccache for main ci build.
It should be available on every builder, so skip detection phase. Will be added if/when needed

21 months agoFix RST formatting + one URL in Release_Notes.rst
Martin Quinson [Fri, 29 Jul 2022 09:15:51 +0000 (11:15 +0200)]
Fix RST formatting + one URL in Release_Notes.rst

21 months agoIf there is no LOCK in mmalloc anymore, then there is no need for atfork
Martin Quinson [Fri, 29 Jul 2022 08:18:41 +0000 (10:18 +0200)]
If there is no LOCK in mmalloc anymore, then there is no need for atfork

21 months agoRemove the need of pthread_mutex in mmalloc, to allow its use with sthread
Martin Quinson [Thu, 28 Jul 2022 23:51:52 +0000 (01:51 +0200)]
Remove the need of pthread_mutex in mmalloc, to allow its use with sthread

Historically, mmalloc was used in all case when MC was activated at
build time (even if MC was not involved at runtime), forcing this
protection against race conditions for e.g. parallel simulations.

But nowadays, mmalloc is only activated at runtime in the verified
application. In other runtime setups, mmalloc uses the libc's malloc
implem instead of itself (that's why we use dlsym in the
initialization of mmalloc, to find the replacement).

So, removing this code should have no impact whatsoever.
Only maybe speeding up the verification a tiny bit.

And now, sthread becomes usable in conjunction with Mc Simgrid!!!

Given the current poor coverage of the pthread API, we can't verify
any useful program, but at least we have a valid (and rather robust)
prototype of such a verification tool.

21 months agoStick to dwarf-4 for MC builds.
Arnaud Giersch [Thu, 28 Jul 2022 11:50:37 +0000 (13:50 +0200)]
Stick to dwarf-4 for MC builds.

TODO: add support for dwarf-5

21 months agoKill useless complexity in mmalloc: one of the dlsym
Martin Quinson [Thu, 28 Jul 2022 08:37:30 +0000 (10:37 +0200)]
Kill useless complexity in mmalloc: one of the dlsym

dlsym is not necessary to retrieve the LD_PRELOAD-injected symbol.

The killed code was intended to be used in libsimgrid, trying to
detect when libsgmalloc was already in memory to use that copy
instead. But that's useless: LD_PRELOAD ensures that the copy of the
injected version is the only existing one in the process.

In addition, that may resolve stability issues that my previous commit
didn't solve as nicely on the build daemons than on my laptop with gcc.

21 months agoAllow dlsym to call free() on memory that is allocated before mmalloc init
Martin Quinson [Thu, 28 Jul 2022 01:06:38 +0000 (03:06 +0200)]
Allow dlsym to call free() on memory that is allocated before mmalloc init

dlsym obviously uses malloc, but we use dlsym while initializing
mmalloc, so we have a static buffer somewhere to give the required
memory to dlsym while mmalloc is not ready to serve. That's old.

Now, since the recent change in mmalloc, dlsym seems to not only
malloc some memory, but it also frees some of the obtained memory.
This commit detects when this happens and react gracefully (by
ignoring the free on that memory) instead of verbosely dying.

21 months agomore protection for non linux builds
Augustin Degomme [Mon, 25 Jul 2022 19:15:13 +0000 (21:15 +0200)]
more protection for non linux builds

21 months agoDisable mmap privatization if MUSL is detected, as it segfaults and we don't really...
Augustin Degomme [Mon, 25 Jul 2022 18:57:21 +0000 (20:57 +0200)]
Disable mmap privatization if MUSL is detected, as it segfaults and we don't really care.
Hack a way of detecting musl, which is not really ideal but should work.

21 months agoAnother attempt at PRELOADing mmalloc (WIP)
Martin Quinson [Fri, 22 Jul 2022 21:24:27 +0000 (23:24 +0200)]
Another attempt at PRELOADing mmalloc (WIP)

Try to have mmalloc both in the simgrid library (for the regular use)
and also as an external library that can be LD_PRELOADed before
sthread too.

We'll have two copies of the library when actually preloading it in
sthread, but in this case, we use dlsym(RTDL_NEXT) to find the first
loaded symbol in memory to have only one mheap in the process.

It still segfault when launching a sthread code within simgrid-mc as
follows:
   bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=lib/libsgmalloc.so:lib/libsthread.soexamples/sthread/pthread-mutex-simple
but at least it should fix the breakage found on FreeBSD.

21 months agoMerge branch 'adegomme-master-patch-16995' into 'master'
Augustin Degomme [Fri, 22 Jul 2022 14:48:35 +0000 (14:48 +0000)]
Merge branch 'adegomme-master-patch-16995' into 'master'

SMPI/replay: Fix issue with recv of size =0.

See merge request simgrid/simgrid!116

21 months agoSMPI/replay: Fix issue with recv of size =0.
Augustin Degomme [Fri, 22 Jul 2022 14:41:43 +0000 (14:41 +0000)]
SMPI/replay: Fix issue with recv of size =0.
Negative values can be used to trigger a probe in case of unknown receive size, but 0 is a legit value.

21 months agoMerge branch 'support-sendrecv-ti' into 'master'
Augustin Degomme [Fri, 22 Jul 2022 14:38:49 +0000 (14:38 +0000)]
Merge branch 'support-sendrecv-ti' into 'master'

Quick and dirty support of SendRecv in time-independent traces

See merge request simgrid/simgrid!115

21 months agoFix build error due to clang-format reordering the headers
Martin Quinson [Thu, 21 Jul 2022 21:09:27 +0000 (23:09 +0200)]
Fix build error due to clang-format reordering the headers

21 months agoSplit mmalloc in a separate library
Martin Quinson [Thu, 21 Jul 2022 21:00:09 +0000 (23:00 +0200)]
Split mmalloc in a separate library

The idea is to allow to preload mmalloc before sthread, that must come
before simgrid itself.

21 months agoFurther small simplifications to mmalloc, killing dead code
Martin Quinson [Thu, 21 Jul 2022 17:06:11 +0000 (19:06 +0200)]
Further small simplifications to mmalloc, killing dead code

21 months agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Thu, 21 Jul 2022 16:22:02 +0000 (18:22 +0200)]
Merge branch 'master' of framagit.org:simgrid/simgrid

21 months agoSeparate mmalloc from xbt
Martin Quinson [Thu, 21 Jul 2022 15:39:17 +0000 (17:39 +0200)]
Separate mmalloc from xbt

This is too bad that we cannot THROW on double free anymore, but we'll
have to live with it if we want to move mmalloc to libsthread.so

21 months agoKill a function that is unused and unimplemented
Martin Quinson [Thu, 21 Jul 2022 10:19:32 +0000 (12:19 +0200)]
Kill a function that is unused and unimplemented

21 months agoJava NativeLib: delete temporary files ASAP.
Arnaud Giersch [Wed, 20 Jul 2022 09:47:12 +0000 (11:47 +0200)]
Java NativeLib: delete temporary files ASAP.

21 months agoKill useless commented code.
Arnaud Giersch [Tue, 19 Jul 2022 08:07:13 +0000 (10:07 +0200)]
Kill useless commented code.

[ci-skip].

21 months agoQuick and dirty support of SendRecv in time-independent traces
chaix [Wed, 20 Jul 2022 08:34:26 +0000 (11:34 +0300)]
Quick and dirty support of SendRecv in time-independent traces

21 months agohave automatic teshsuite use only stdout to avoid tesh mixups in output when stderr...
Augustin Degomme [Tue, 19 Jul 2022 08:56:37 +0000 (10:56 +0200)]
have automatic teshsuite use only stdout to avoid tesh mixups in output when stderr is used

21 months agoadd casts in case types don't match (musl). Let's hope it does not break elsewhere
Augustin Degomme [Tue, 19 Jul 2022 07:38:05 +0000 (09:38 +0200)]
add casts in case types don't match (musl). Let's hope it does not break elsewhere

21 months agodoc fix [no-ci]
Fred Suter [Mon, 18 Jul 2022 21:33:46 +0000 (17:33 -0400)]
doc fix [no-ci]

have an example that lazy users can copy without having weird
compilation errors

21 months agoRemove redundant cast.
Arnaud Giersch [Mon, 18 Jul 2022 07:39:39 +0000 (09:39 +0200)]
Remove redundant cast.

21 months agoFix distcheck (populate tesh_files, even when !HAVE_MC).
Arnaud Giersch [Fri, 15 Jul 2022 21:16:57 +0000 (23:16 +0200)]
Fix distcheck (populate tesh_files, even when !HAVE_MC).

21 months agoPrevent segfault when VM's host is created with pstate > 0
Fred Suter [Fri, 15 Jul 2022 14:12:56 +0000 (10:12 -0400)]
Prevent segfault when VM's host is created with pstate > 0

sealing the vCPU before setting its pstate to that of the physical host
seems to be enough.

21 months agosthread: correctly switch to within simgrid when calling shtread API
Martin Quinson [Wed, 13 Jul 2022 15:53:01 +0000 (17:53 +0200)]
sthread: correctly switch to within simgrid when calling shtread API

21 months agomc::api: Inline a useless function
Martin Quinson [Tue, 12 Jul 2022 21:31:23 +0000 (23:31 +0200)]
mc::api: Inline a useless function

21 months agoMake sure that all MC tests are built on target tests-mc
Martin Quinson [Tue, 12 Jul 2022 21:30:17 +0000 (23:30 +0200)]
Make sure that all MC tests are built on target tests-mc

21 months agommalloc: rename a symbol to prepare further refactorings
Martin Quinson [Tue, 12 Jul 2022 16:24:42 +0000 (18:24 +0200)]
mmalloc: rename a symbol to prepare further refactorings

21 months agoWhen multi-threaded Exec are launched on VM, account for each thread as an exec to...
SUTER Frederic [Wed, 13 Jul 2022 15:37:30 +0000 (17:37 +0200)]
When multi-threaded Exec are launched on VM, account for each thread as an exec to compute weight

21 months agoget access to Exec thread count
SUTER Frederic [Wed, 13 Jul 2022 15:35:50 +0000 (17:35 +0200)]
get access to Exec thread count

21 months agoUse fixed point arithmetic to avoid rounding errors.
Arnaud Giersch [Wed, 13 Jul 2022 08:59:11 +0000 (10:59 +0200)]
Use fixed point arithmetic to avoid rounding errors.

21 months agoFix CMakeLists for when makecontext is not compilable.
Arnaud Giersch [Tue, 12 Jul 2022 12:54:22 +0000 (14:54 +0200)]
Fix CMakeLists for when makecontext is not compilable.

Patch from @adegomme.

21 months agoFix build error with musl libc.
Arnaud Giersch [Tue, 12 Jul 2022 12:46:38 +0000 (14:46 +0200)]
Fix build error with musl libc.

21 months agoFix definition of overriding gettimeofday.
Arnaud Giersch [Tue, 12 Jul 2022 08:12:40 +0000 (10:12 +0200)]
Fix definition of overriding gettimeofday.

(make it work when __GLIBC_PREREQ is not defined).

21 months agoHandle different types for second parameter of gettimeofday.
Arnaud Giersch [Mon, 11 Jul 2022 07:57:07 +0000 (09:57 +0200)]
Handle different types for second parameter of gettimeofday.

21 months agoFor sonar...
Arnaud Giersch [Mon, 11 Jul 2022 09:18:20 +0000 (11:18 +0200)]
For sonar...

21 months agoThe variable is named LD_BIND_NOW so these lines were never useful -- kill them
Martin Quinson [Mon, 11 Jul 2022 10:17:09 +0000 (12:17 +0200)]
The variable is named LD_BIND_NOW so these lines were never useful -- kill them

21 months agoSurvive with old cmakes
Martin Quinson [Sun, 10 Jul 2022 22:33:55 +0000 (00:33 +0200)]
Survive with old cmakes

21 months agoCompile pthread-mutex-simple in a way that allows its model-checking
Martin Quinson [Sun, 10 Jul 2022 22:22:01 +0000 (00:22 +0200)]
Compile pthread-mutex-simple in a way that allows its model-checking

21 months agoMC: allow to pass env variables to the verified application
Martin Quinson [Sun, 10 Jul 2022 22:08:30 +0000 (00:08 +0200)]
MC: allow to pass env variables to the verified application

21 months agosthread: Intercept gettimeofday + sleep + usleep
Martin Quinson [Sun, 10 Jul 2022 18:00:43 +0000 (20:00 +0200)]
sthread: Intercept gettimeofday + sleep + usleep

21 months agoFix changelog [ci-skip]
Bruno Donassolo [Fri, 8 Jul 2022 09:38:43 +0000 (11:38 +0200)]
Fix changelog [ci-skip]

21 months agoMerge branch 'issue111' into 'master'
Bruno Donassolo [Fri, 8 Jul 2022 09:26:41 +0000 (09:26 +0000)]
Merge branch 'issue111' into 'master'

Workaround for multicore ptasks.

Closes #111

See merge request simgrid/simgrid!114

21 months agoWorkaround for multicore ptasks.
Bruno Donassolo [Thu, 7 Jul 2022 15:53:30 +0000 (17:53 +0200)]
Workaround for multicore ptasks.

Fixes https://framagit.org/simgrid/simgrid/-/issues/111.

Workaround for multicore ptasks (when user sets the same s4u::Host*
multiple times in the ptask).

The Element class in System.cpp links a variable and a constraint.
Ideally, we could have only 1 element for each pair variable/constraint.
However, the fair_bottleneck solver needs different elements to cope with multicore ptasks.
At FairBottleneck::solver, it considers each elem as a "variable" which must receive a full
share of the resource.

Multiple elements per contraint/variable isn't necessary for others solvers (maxmin, bmf).
However, it's probably not possible to use BMF at this moment
considering its instability and the current implementation in ptask_L07.cpp (especially the configuration of
task bound which is specific for FairBottleneck solver).

Partially revert change to set 1 element per constraint/variable pair (done at ecb0903f).

21 months agoRedundant initializations.
Arnaud Giersch [Tue, 5 Jul 2022 07:32:12 +0000 (09:32 +0200)]
Redundant initializations.

21 months ago[project-description] Fix extraction of the ns-3 version.
Arnaud Giersch [Mon, 4 Jul 2022 09:41:06 +0000 (11:41 +0200)]
[project-description] Fix extraction of the ns-3 version.

[ci-skip]

21 months agoReintroduce "3-dev" in list of ns3 known versions.
Arnaud Giersch [Sun, 3 Jul 2022 21:45:03 +0000 (23:45 +0200)]
Reintroduce "3-dev" in list of ns3 known versions.

21 months agoRecompute set of ns-3 lirairies.
Arnaud Giersch [Sun, 3 Jul 2022 20:57:26 +0000 (22:57 +0200)]
Recompute set of ns-3 lirairies.

Hack taken from CMakeLists.txt before commit
2104ee14b4207b9830a0ab424538ba900d4106bc Adapt to the upcoming ns-3 v3.36.1

21 months agoTry to fix number of '\' escapes in cmake regexps.
Arnaud Giersch [Sun, 3 Jul 2022 13:40:25 +0000 (15:40 +0200)]
Try to fix number of '\' escapes in cmake regexps.

21 months agosthread: don't intercept the main when run from smpirun
Martin Quinson [Sat, 2 Jul 2022 20:40:42 +0000 (22:40 +0200)]
sthread: don't intercept the main when run from smpirun

21 months agoAdapt to the upcoming ns-3 v3.36.1
Martin Quinson [Sat, 2 Jul 2022 11:39:11 +0000 (13:39 +0200)]
Adapt to the upcoming ns-3 v3.36.1

21 months agoMake libsthtread valgrind-aware.
Arnaud Giersch [Fri, 1 Jul 2022 15:04:19 +0000 (17:04 +0200)]
Make libsthtread valgrind-aware.

Without this change, libsthread is initialized twice when using valgrind:
one for the valgrind launcher, and one for the target program.

Use the environment variable VALGRIND_LIB to detect the usage of valgrind,
and don't divert main() when RUNNING_ON_VALGRIND returns 0.

Just hope that noboby has VALGRIND_LIB in its environment without using valgrind.
In this case, the check can be reinforced by looking for the substring "valgrind" in argv[0].

For example, run:
valgrind --trace-children=yes env LD_PRELOAD=./lib/libsthread.so ./examples/sthread/pthread-mutex-simple

21 months agoSonar issues.
Arnaud Giersch [Fri, 1 Jul 2022 08:37:11 +0000 (10:37 +0200)]
Sonar issues.

22 months agoFix test with ASan.
Arnaud Giersch [Thu, 30 Jun 2022 13:11:13 +0000 (15:11 +0200)]
Fix test with ASan.

It failed with: ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

Use ASAN_OPTIONS=verify_asan_link_order=0 instead.

22 months agoPlease valgrind.
Arnaud Giersch [Thu, 30 Jun 2022 08:32:31 +0000 (10:32 +0200)]
Please valgrind.

22 months agoCosmetics (indentation, codefactor.io).
Arnaud Giersch [Thu, 30 Jun 2022 08:17:10 +0000 (10:17 +0200)]
Cosmetics (indentation, codefactor.io).

[ci-skip]

22 months agoMerge branch 'dev-get-hostname-faster' into 'master'
Arnaud Giersch [Thu, 30 Jun 2022 08:15:45 +0000 (08:15 +0000)]
Merge branch 'dev-get-hostname-faster' into 'master'

Make host_by_name faster

See merge request simgrid/simgrid!112

22 months agoMerge branch 'python_ptask' into 'master'
Arnaud Giersch [Thu, 30 Jun 2022 08:02:59 +0000 (08:02 +0000)]
Merge branch 'python_ptask' into 'master'

Add ptasks in the Python bindings

See merge request simgrid/simgrid!113

22 months agoFix the test
Tom Cornebize [Wed, 29 Jun 2022 15:48:58 +0000 (17:48 +0200)]
Fix the test

22 months agoAdd the new test in the cmake file
Tom Cornebize [Wed, 29 Jun 2022 15:40:32 +0000 (17:40 +0200)]
Add the new test in the cmake file

22 months agoAdd the new test in file MANIFEST.in
Tom Cornebize [Wed, 29 Jun 2022 14:51:42 +0000 (16:51 +0200)]
Add the new test in file MANIFEST.in

22 months agoAdd ptasks in the Python bindings
Tom Cornebize [Wed, 29 Jun 2022 13:24:48 +0000 (15:24 +0200)]
Add ptasks in the Python bindings

- This adds several functions in the Python bindings used for manipulating
  ptasks, such as parallel_execute or exec_init.
- This also adds the Engine.set_config function, needed for changing the
  configuration to 'host/model:ptask_L07' in the script.
- Finally, an exec-ptask.py example is added, exact translation of the
  C++ example s4u-exec-ptask.cpp.

22 months agoDisable sthread at the end of the sthread_main
Martin Quinson [Wed, 29 Jun 2022 06:16:16 +0000 (08:16 +0200)]
Disable sthread at the end of the sthread_main

22 months agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Tue, 28 Jun 2022 20:13:36 +0000 (22:13 +0200)]
Merge branch 'master' of framagit.org:simgrid/simgrid

22 months agoAdd a TESH for the new sthread feature
Martin Quinson [Tue, 28 Jun 2022 20:07:02 +0000 (22:07 +0200)]
Add a TESH for the new sthread feature

22 months agoSMPI_is_inited() and smpi_enabled() have the same purpose. Keep only the former.
Arnaud Giersch [Tue, 28 Jun 2022 13:08:05 +0000 (15:08 +0200)]
SMPI_is_inited() and smpi_enabled() have the same purpose. Keep only the former.

22 months agoNo need to duplicate functions.
Arnaud Giersch [Tue, 28 Jun 2022 09:40:37 +0000 (11:40 +0200)]
No need to duplicate functions.

22 months agoUncomment code.
Arnaud Giersch [Tue, 28 Jun 2022 12:38:07 +0000 (14:38 +0200)]
Uncomment code.

22 months agoEasy Sonar smells.
Arnaud Giersch [Tue, 28 Jun 2022 12:37:59 +0000 (14:37 +0200)]
Easy Sonar smells.

22 months agoUse std::string.
Arnaud Giersch [Tue, 28 Jun 2022 12:30:45 +0000 (14:30 +0200)]
Use std::string.

22 months agoMissing return in the raw path.
Arnaud Giersch [Tue, 28 Jun 2022 12:07:33 +0000 (14:07 +0200)]
Missing return in the raw path.

22 months agoAvoid memory leak when exception is thrown.
Arnaud Giersch [Tue, 28 Jun 2022 11:46:33 +0000 (13:46 +0200)]
Avoid memory leak when exception is thrown.

22 months agoMake sthread_inside_simgrid static into libsthread in the (vain) hope that it'll...
Martin Quinson [Mon, 27 Jun 2022 20:01:03 +0000 (22:01 +0200)]
Make sthread_inside_simgrid static into libsthread in the (vain) hope that it'll help the init/fini phases

but unfortunately the symptoms are exactly the same:
- default builds work well with sthread LD_PRELOAD'ed
- MC builds segfault once the second thread starts in this case
- ns-3 builds deadlock in dl_init with sthread

I'm still commiting this because I believe that breaking the hard
dependency of sthread -> simgrid goes in the right direction: If
sthread is alone in memory without simgrid (as it may happen at
init/fini phases), it's a rather bad idea for sthread to use a
variable that lives in simgrid symbols.

Maybe I should load simgrid dynamically with libdl instead of
depending on it to further untighten the dependency, but I'd prefer to
understand. Plus, it'd only help at init phase and ns-3 builds are not
the ones I'd prefer to fix here.

22 months agoDistcheck!
Arnaud Giersch [Mon, 27 Jun 2022 09:36:19 +0000 (11:36 +0200)]
Distcheck!

22 months agoMerge branch 's4u_enforce' into 'master'
Arnaud Giersch [Mon, 27 Jun 2022 09:30:00 +0000 (09:30 +0000)]
Merge branch 's4u_enforce' into 'master'

Implement s4u_enforce

See merge request simgrid/simgrid!111

22 months agoAnswer to Mt comments
Fabien Chaix [Mon, 27 Jun 2022 06:35:01 +0000 (09:35 +0300)]
Answer to Mt comments

22 months agomake sthread work out of MC build trees
Martin Quinson [Sun, 26 Jun 2022 10:48:35 +0000 (12:48 +0200)]
make sthread work out of MC build trees

22 months agoMake vm_by_name() public and modify c-cloud-migration to use new functions
Fabien Chaix [Sat, 25 Jun 2022 22:08:45 +0000 (01:08 +0300)]
Make vm_by_name() public and modify c-cloud-migration to use new functions

22 months agotentative of implementing pthread_join, and to ensure that we are inside simgrid...
Martin Quinson [Sat, 25 Jun 2022 10:02:58 +0000 (12:02 +0200)]
tentative of implementing pthread_join, and to ensure that we are inside simgrid once the context stops

22 months agoMake sure that sthread_inside_simgrid is initially 1 to protect all lib constructors
Martin Quinson [Fri, 24 Jun 2022 23:11:09 +0000 (01:11 +0200)]
Make sure that sthread_inside_simgrid is initially 1 to protect all lib constructors

Even the ones that we don't control, such as gdb's...

In addition, there is no need to define sthread_inside_simgrid in
libsimgrid. We can keep it to libsthread where it belongs.

Also do some other cleanups around.