Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.bash_history truncated after Terminal update #11669

Closed
GPHemsley-RELX opened this issue Nov 1, 2021 · 4 comments
Closed

.bash_history truncated after Terminal update #11669

GPHemsley-RELX opened this issue Nov 1, 2021 · 4 comments
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.

Comments

@GPHemsley-RELX
Copy link

GPHemsley-RELX commented Nov 1, 2021

Windows Terminal version (or Windows build number)

1.11.2921.0

Other Software

Ubuntu 20.04 (WSL1)

Steps to reproduce

I can't say for sure if Windows Terminal is to blame here (as opposed to some overzealous enterprise sanitizing, for example), but I figured I'd file this just in case.

If it is, then I suspect this is vaguely what happened:

All I really know is that .bash_history is now empty and a new version of Terminal was recently released.

Expected Behavior

Some copy of .bash_history (from some instance) is present. In other words, whatever it was doing before.

Actual Behavior

.bash_history is truncated and no history from any instance is available.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 1, 2021
@zadjii-msft
Copy link
Member

Weird! I don't really know how bash goes about persisting the history. This might be a side effect of the "WSL processes get orphaned when the Terminal is force-updated by the store" issue, #9914.

@therealkenc IIRC you're the WSL triage wizard, any ideas here?

@zadjii-msft
Copy link
Member

I'm guessing that this is somehow related to #9914. I don't know when bash writes out .bash_history, and I don't know why it would be empty. That would almost imply that the bash process totally cleared it out, which doesn't make any sense. I'm under the impression that bash just appends to it, always. That's real weird.

There might be something else going on here in ubuntu land. (impossible to say right now because stack exchange is down at the time of writing):

There's enough posts here for me to think this isn't solely a Terminal problem. You still seeing this/?

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 29, 2022
@GPHemsley-RELX
Copy link
Author

GPHemsley-RELX commented Aug 1, 2022

I only encountered it that one time, so it's hard to say. At a glance, all of those Stack Exchange posts suggest that it has something to do with permissions, so I wonder if there was some sort of race condition where the WSL drive wasn't properly set up? I don't know if that would be a thing caused by Windows or by all the security management things on my computer, though.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 1, 2022
@zadjii-msft
Copy link
Member

Huh. Well, if it hasn't happened again, let's just close this out for bookkeeping's sake. If it starts happening again, or someone else starts seeing this, we can reopen and revaluate. Thanks!

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2022
@zadjii-msft zadjii-msft added the Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely. label Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.
Projects
None yet
Development

No branches or pull requests

2 participants