Skip to content

bug with --chdir-after-load option (commit 25224cad833) #14

@bstarynk

Description

@bstarynk

Assume RefPerSys source code (and executable) is in your $HOME/RefPerSys

Assume also that your $HOME/tmp is a writable directory (on some non-full disk,on Linux)

then in commit 25224ca on a Linux x86-64 multicore machine running the following command (in your $HOME/RefPerSys directory)

  ./refpersys --batch --chdir-after-load $HOME/tmp/ --dump mytestdump

is failing with something close to

** RefPerSys INFORM! load_rps.cc:802: void Rps_Loader::load_all_state_files() loaded 1 space files in second pass with 211 objects and 0 todos

** RefPerSys INFORM! load_rps.cc:1516: void rps_load_from(const std::string&) rps_load_from completed
... from directory $HOME/RefPerSys with RefPerSys built Sun 25 Feb 2024 11:52:43 AM CET
 lastgitcommit 25224cad8338 du_topdir is a realpath in Rps_Dumper
 md5sum daab78376089008a0999c70876ffb8ca
 loaded 211 objects in 0.005 elapsed, 0.005 cpu seconds
 so 24.408 elapsed µs/ob, 24.402 cpu µs/ob, in 8177 memory words.
=============================================================================


** RefPerSys INFORM! main_rps.cc:1387: int main(int, char**) after loading the current directory has changed to $HOME/tmp


*** RefPerSys INFORM: main_rps.cc:434: <void rps_run_loaded_application(int&, char**)>
 rps_run_loaded_application: start of ./refpersys (with 6 args)
.. gitid 25224cad8338d9015f24a05c199e8ceb9af62ece+
.. build timestamp Sun 25 Feb 2024 11:52:43 AM CET
.. last git commit 25224cad8338 du_topdir is a realpath in Rps_Dumper
.. md5sum daab78376089008a0999c70876ffb8ca
.. in $HOME/tmp
.. on host rimski pid 43713




*** RefPerSys INFORM: main_rps.cc:1408: <int main(int, char**)>
 RefPerSys (pid 43713 on rimski shortgit 25224cad8338+) will dump into mytestdump
… from current directory $HOME/tmp


** RefPerSys INFORM! dump_rps.cc:1588: void rps_dump_into(std::string, Rps_CallFrame*) start dumping into $HOME/tmp/mytestdump with temporary suffix _3Lqb3r-p43713%
** RefPerSys WARN! dump_rps.cc:1597:: failed to make dump sub-directory $HOME/tmp/mytestdump/persistore:Invalid argument

**!** REFPERSYS WARNING at dump_rps.cc:1597
** RefPerSys WARN! dump_rps.cc:1637:: failure in dump to $HOME/tmp/mytestdump
... got exception of type St13runtime_error:failed to make dump directory:$HOME/tmp/mytestdump/persistore

**!** REFPERSYS WARNING at dump_rps.cc:1637
terminate called after throwing an instance of 'std::runtime_error'
  what():  failed to make dump directory:$HOME/tmp/mytestdump/persistore

where I just replaced my home directory with $HOME

This also happens with commit 25224ca (master branch, Feb 25, 2024)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions