Coder Social home page Coder Social logo

Comments (7)

nolanmar511 avatar nolanmar511 commented on June 25, 2024

Based on our documentation, we should be using "%USERPROFILE%/pprof" on windows when no value is set for PPROF_TMPDIR.
Just to double check, do you know if there was a value for %USERPROFILE% when you had this error?

from pprof.

realityexists avatar realityexists commented on June 25, 2024

Yes, I have %USERPROFILE% set. It's easily reproducible by running go tool pprof blah - it doesn't seem to matter whether the file "blah" exists or not.

from pprof.

nolanmar511 avatar nolanmar511 commented on June 25, 2024

I've tried running the latest version of pprof, with go version 1.8.3, on a Windows machine when %PPROF_TEMPDIR% is not set. However, I wasn't able to replicate this error.

Do you how recent your version of pprof is, or if this problem persists for you with the latest version? Could it be related to your version of windows (I ran this on a computer with Windows 10 Home)?

from pprof.

aalexand avatar aalexand commented on June 25, 2024

Note that the user runs go tool pprof myfile.prof here, which uses pprof that is part of Go distribution.

from pprof.

aalexand avatar aalexand commented on June 25, 2024

Maybe this is golang/go#18864 which was fixed in #95?

from pprof.

realityexists avatar realityexists commented on June 25, 2024

Yes, it looks like the same issue to me. I would still suggest checking that whatever environment variable you picked is not empty before appending a sub-path to it. Doing that would have given a clearer error here. Also, in one case filepath.Join(os.Getenv(homeEnv()), ... is used and in another case os.Getenv(homeEnv()) + "/pprof" - not sure if that's safe on Windows.

from pprof.

aalexand avatar aalexand commented on June 25, 2024

Using filepath.Join() consistently and not using empty string as an absolute path prefix are all reasonable things, yes.

from pprof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.