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
Refresh hangs #35
Comments
It looks to me like You probably just need to add a |
Yes, that fixes it. I'll submit a PR. |
Yes, looks good! |
Is there any chance of getting this into Xenial as an SRU? It's hanging my stock Xenial machine all the time ATM. I assume my |
Do you have a way to reproduce this? That would help getting a SRU done. In any case, you reporting a bug would be helpful, I could take it from there then. |
I could bundle up the files that Are there any other directories I'd need to include? |
Hmm, including the files likely doesn't make sense, since every Ubuntu user has the exact same data in those directories. |
They don't have the data from my third-party repo, although I know you've tried it with my repo configured. Perhaps it's just some unlikely data-ordering thing that triggers it. I assume the files are read in the order that they happen to be stored in the directory, and not alphabetical order, so even with the same files the problem might not occur. I'll see if I can get it to occur on a different machine. |
I can reproduce it 100% in a very simple docker container. Here's the
To use it, put this text in a file called Build the container with: docker build -t appstream . Run the container with: docker run --rm -it appstream Once in the container: apt-get update It fetches the indices, including DEP-11, and then hangs. Running Note: I'm using If I take
Running
I assume that having the recommended dependencies present just changes the layout in memory enough to produce different random behaviour. |
This indicates that the tool couldn't write to |
Two things:
I used
This time, of course, I don't get the value of the variables, but I assume they'd be more or less the same. |
Providing feedback on https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712 would definitely help. I think there is something else seriously wrong on your system, it actually might even be some subtle bug in libyaml... |
I found the reason why it's looping when getting bad data. The code completely ignores errors from I've fixed the problem so I'll submit a PR. It's not exactly a fix to this issue, but it's definitely an improvement. With the fix in place, the output is now:
So it gets all the way to the end, and then hits the other error. I checked the errno in |
I discovered a problem in my Docker test environment, which in turn is due to a subtle problem in The compressed yaml files were being given a content type of I poked around in the However, I still get looping with the stock
I don't know why it gets those few garbage bytes only when processing just one of the metadata files from my repo. Maybe it's just random (ie my bad luck) or maybe because the files are much shorter than the ones already processed for the official repos. It's certainly very sensitive to environmental factors. I'll add my feedback to LP #1579712 |
Thanks for the reactivity! A note just for users looking to solve manually this. Because cd /tmp && mkdir asfix
cd asfix
wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i *.deb
rm *.deb
cd ..
rmdir asfix |
@Nicolab It's actually sufficient just to hit |
Step1 : The problem show "extended_states" https://sathyasays.com/2009/11/08/how-to-fix-e-unable-to-parse-package-file-varlibaptextended_states-1-error-in-synaptic-or-apt-get/ Step2 : The problem show "appstream" download the appstram file which match your system version. This file is ubuntu 18.04 LTS.
The problem is fixed. |
I have a third-party Ubuntu repo at http://packages.sil.org/ubuntu. I'm using a Xenial test machine. After refreshing sources with
apt-get update
, I runappstreamcli
as follows:It then hangs, using 100% CPU. I've left it as long as 10 minutes and it still doesn't finish. The output is:
If I run it from a root shell (
sudo -s
) or wrap it with a shell (sudo bash -c '...'
) I get the same result. Previously, it would run successfully like this, but the behaviour has now changed. The only difference I can think of is that I've installed build dependencies forappstream
and have built it from source. However, I haven't donemake install
and it doesn't matter whether I run the built-from-source version or the installed package.Very annoyingly, if I try to run
appstreamcli
fromgdb
, it runs successfully! So I can't step through the code and see exactly what's happening. Instead, I'm having to rely on creating a core dump, and because it's being run from a set-uid program, I have to set/proc/sys/fs/suid_dumpable
and/proc/sys/kernel/core_pattern
appropriately. I can then use^\
to sendSIGQUIT
and usegdb
on the resulting core dump.I get the following backtrace:
The content of
/var/lib/app-info/yaml/packages.sil.org_ubuntu_dists_xenial_universe_dep11_Components-amd64.yml.gz
is:It looks like
as_metadata_parse_yaml
is being given some extra junk characters on the end of the real data (\360\273p\001
). These are definitely not in the real file (I checked withzcat ... | hexdump -C
).The output of
ldd tools/appstreamcli
is:So it's picking up system libraries for everything except
libappstream.so.3
, as it should.The text was updated successfully, but these errors were encountered: