AutoSysimages.jl icon indicating copy to clipboard operation
AutoSysimages.jl copied to clipboard

Version 0.2.5 broken, asks twice to create sysimage

Open ufechner7 opened this issue 3 years ago • 5 comments

I am asked twice if I want to create a sysimage when leaving the first session after update to new package version. In the end two images are created, but they do not work (are loaded but no decrease in FTTP).

ufechner@TUD277255:~/repos/Plotting$ asysimg --project
┌ Info: The package AutoSysimages.jl started!
│  Loaded sysimage:    Default (You may run AutoSysimages.build_sysimage())
│  Active directory:   /home/ufechner/.julia/asysimg/1.8.1/23ZRuw
│  Global snoop file:  /home/ufechner/.julia/asysimg/1.8.1/23ZRuw/snoop-file.jl
└  Tmp. snoop file:    /tmp/jl_ABiNGf03c1-snoop.jl
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.1 (2022-09-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

asysimg> @time include("src/plot.jl")
To zoom, draw a rectangle while keeping the right mouse key pressed!
To go back to see the full graph, press <CTRL><f>
 17.227440 seconds (43.38 M allocations: 2.395 GiB, 4.71% gc time, 71.96% compilation time: 12% of which was recompilation)

asysimg> 
[ Info: AutoSysimages: Copy snooped statements to: /home/ufechner/.julia/asysimg/1.8.1/23ZRuw/snoop-file.jl
[ Info: There is no sysimage for this project. Do you want to build one?
 > Yes
   No
[ Info: AutoSysimages: Collecting precompile statements for empty run (-e "")
┌ Info: The package AutoSysimages.jl started!
│  Loaded sysimage:    Default (You may run AutoSysimages.build_sysimage())
│  Active directory:   /home/ufechner/.julia/asysimg/1.8.1/1wTEXm
│  Global snoop file:  /home/ufechner/.julia/asysimg/1.8.1/1wTEXm/snoop-file.jl
└  Tmp. snoop file:    /tmp/jl_ytapmHunwN-snoop.jl
[ Info: AutoSysimages: Copy snooped statements to: /home/ufechner/.julia/asysimg/1.8.1/1wTEXm/snoop-file.jl
[ Info: There is no sysimage for this project. Do you want to build one?
 > Yes
   No
[ Info: AutoSysimages: Collecting precompile statements for empty run (-e "")
[ Info: AutoSysimages: Building system image by PackageCompiler.
⠸ [00m:09s] PackageCompiler: compiling incremental system image┌ Warning: There is no statement file
└ @ Main.anonymous /home/ufechner/.julia/packages/AutoSysimages/9SsCR/src/precompile-PackageCompiler.jl:44
⢰ [00m:09s] PackageCompiler: compiling incremental system image
✔ [02m:24s] PackageCompiler: compiling incremental system image
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libstdc++.so: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libstdc++.so: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
[ Info: AutoSysimages: Builded in 146.55096817016602 s
[ Info: AutoSysimages: Building system image by PackageCompiler.
⠇ [00m:08s] PackageCompiler: compiling incremental system image┌ Warning: There is no statement file
└ @ Main.anonymous /home/ufechner/.julia/packages/AutoSysimages/pf4ZI/src/precompile-PackageCompiler.jl:44

✔ [02m:11s] PackageCompiler: compiling incremental system image
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libstdc++.so: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libstdc++.so: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: warning: /home/ufechner/packages/julias/julia-1.8/lib/julia/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
[ Info: AutoSysimages: Builded in 295.65954995155334 s
ufechner@TUD277255:~/repos/Plotting$ 

Second time starting asysimg, no speed improvement:

ufechner@TUD277255:~/repos/Plotting$ asysimg --project
┌ Info: The package AutoSysimages.jl started!
│  Loaded sysimage:    /home/ufechner/.julia/asysimg/1.8.1/23ZRuw/asysimg-2022-09-22T08-19-05.177.so
│  Active directory:   /home/ufechner/.julia/asysimg/1.8.1/23ZRuw
│  Global snoop file:  /home/ufechner/.julia/asysimg/1.8.1/23ZRuw/snoop-file.jl
└  Tmp. snoop file:    /tmp/jl_fqH2RYj43C-snoop.jl
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.1 (2022-09-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

asysimg> @time include("src/plot.jl")
To zoom, draw a rectangle while keeping the right mouse key pressed!
To go back to see the full graph, press <CTRL><f>
 17.210109 seconds (43.38 M allocations: 2.396 GiB, 4.81% gc time, 71.98% compilation time: 13% of which was recompilation)

asysimg> 
ufechner@TUD277255:~/repos/Plotting$ cat Project.toml 
[deps]
AutoSysimages = "4eb35182-e5c8-446d-8ecc-33e714a26cef"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
InspectDR = "d0351b0e-4b05-5898-87b3-e2a8edfddd1d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[compat]
Gtk = "~1.2"
julia = "1.7, 1.8"

ufechner7 avatar Sep 22 '22 06:09 ufechner7

I've notice this problem but it should be already fixed by checking isinteractive() in both

  • main branch https://github.com/petvana/AutoSysimages.jl/blob/c8bfb5dccced031d0e6701dbebb3534864c6129b/src/AutoSysimages.jl#L125-L129
  • latest released version v0.2.5 https://github.com/petvana/AutoSysimages.jl/blob/c8bfb5dccced031d0e6701dbebb3534864c6129b/src/AutoSysimages.jl#L125

petvana avatar Sep 22 '22 07:09 petvana

Well, I tested the latest version (0.2.5). Of course it is possible that I had some old artifacts somewhere, but it is not clear for me how to delete all old artifacts when installing a new version.

ufechner7 avatar Sep 22 '22 11:09 ufechner7

It's possible that the old version was in the loaded sysimage. That is why the dev version is not included automatically.

petvana avatar Sep 22 '22 11:09 petvana

I try again when #21 is implemented...

ufechner7 avatar Sep 22 '22 11:09 ufechner7

Some progress: I downloaded the file clean.sh, removed the last line and put in in my home dir:

ufechner@tuxedi:~$ cat clean.sh 
#!/usr/bin/env bash

# Thish removes all files produced by AutoSysimages.jl
rm -rf ~/.julia/asysimg/
rm -f ~/.julia/environments/v*/SysimagePreferences.toml

and executed it.

Then I updated my main environment and added AutoSysimage to my local environment. I also executed:

using AutoSysimages
install()

Now I could execute:

asysimg --project

but it had no effect, the startup script was not executed, it behaved as

julia --project

Then I executed:

julia --project
import AutoSysimages
AutoSysimages.start()

Now I could execute my plotting script and when pressing ctrl+d I was asked if I want to create a system image. I said yes and it worked.

ufechner7 avatar Sep 22 '22 14:09 ufechner7