c++ – curl_multi_wakeup doesn’t seem to wakeup the associated curl_multi_poll – Android (but may not be limited to)

Curl version: 7.71.0 with c-ares

Background

We are building a library that’s being integrated into mobile apps. We are targeting both iOS and Android.
Curl initialisation happens in a static block inside the library.

The iOS version of the library is bundled into a framework, which is loaded at app startup, if i’m not mistaken.
The Android version of the library is bundled in a module, which is lazily loaded. (I know this is an issue, especially since we link against OpenSSL, but it’s probably important for context).

We built a small HTTP client with curl, that allows use to download some data blob from trusted servers.

Quick architecture review

The HTTP client is running on its own thread. It holds a curl_multi_handle, and any transfer started append a curl_easy_handle to it, and return a handle to a Response that contains a buffer to read the received bytes from, and is used to control the transfer if needed.

Since cURL handles are not thread safe, any action (referred to as Tasks from now on) to the handle is dispatched to the HTTP client’s thread, and a boost::shared_future is returned (we might want to block or not depending on the use case).

Here is a rough idea of how the main loop is structured:

while (!done) {
    deal_with_transfer();
    check_transfer_status();
    cleanup_any_orphan_transfer();
    execute_all_queue_tasks();
    curl_multi_poll(multi, nullptr, 0, very_large_number, nullptr);
}

Appending to the task queue also performs a curl_multi_wakeup(multi) to make sure that task is executed (e.g. adding a new download is also a dispatched task).

The issue

We’ve only thus far tested on Android, and we’ve seen in some cases, HTTP client tasks that are blocking are sometimes never returning.

Logs and stacktraces show that we wait on a task being executed on by the HTTP client, but the client is still polling. Everything seems to indicate that it was’t woken up when appending a task.

I can’t seem to replicate the issue locally, on a device, but it happens often enough to be a blocker issue.

I’m a bit at a loss here, and I don’t really know where to start looking to find a way to reproduce the issue, let alone fixing it.

I hope I gave enough context to start making educated guess, or even find a the source of error!

Thanks for reading!

Bitsamo Limited – Bitsamo.net

I Am Not Admin/Owner Of The Project! !!!

Reduced Size Image

Online Date : 2021-02-27

Investment Plans: 0.4% – 1% Hourly Forever

Min Spend : 20$

Referral Commission : 7-3-1%

Withdrawal Type Instant

Licensed Script

DDoS Protection by DDOS-Guard

Accpet Payment : Perfectmoney, Bitcoin, Litecoin, Ethereum, Bitcoin Cash, Dogecoin, Dash.
.
About Project :

QUOTE

Welcome to the website of BitSamo Limited! If you find yourself here, you are definitely in search of reliable and profitable investment. Yes, you are just at the right place! Our company offers trust assets management of the highest quality on the basis of foreign exchange and profitable trade through Bitcoin exchanges. There is no other worldwide financial market that can guarantee a daily ability to generate constant profit with the large price swings of Bitcoin. Proposed modalities for strengthening cooperation will be accepted by anyone who uses cryptocurrency and knows about its fantastic prospects. Your deposit is working on an ongoing basis, and makes profit everyday with the ability to withdraw profit instantly. Join our company today and start making high profits!

JOIN NOW

Refback : http://invest-analysis.org/?a=details&lid=2469

Hourmillion Limited – Hourmillion.com

I am NOT the Admin or Owner of this program!
Start: Feb 23rd, 2021

HourMillion.com

QUOTE

About HourMillion

As a cryptocurrency investment management company with over eight years experience and a highly qualified staff, we have the knowledge and expertise to help you grow any cryptocurrency investment. Let’s explore some of the benefits of using our service. Our professional staff is much more than just a crypto-currency investment company and is ready to help you at every stage of the investment process. We hope this article has helped you to understand the benefits of cryptocurrency as well as to learn more about our company’s expertise. An international company with 12 experts from 5 different countries, we are here to help you start investing in cryptocurrencies today. Contact us today for a free consultation. We will be happy to hear from you!

UK COMPANY
HOURMILLION
LTD #13080507
IPB Image

Investment Plans:

QUOTE

Truck
1.17% – 3% Hourly for 90 hours
$10 – $449
$450 – $4500
Instant Withdrawals
Principal Included
3% Commission

Porche
6% – 8% Hourly for 40 hours
$450 – $999
$1000 – $45000
Instant Withdrawals
Principal Included
5% Commission

Ferrari
15% – 18% Hourly for 20 hours
$4500 – $5999
$6000 – $450000
Instant Withdrawals
Principal Included
10% Commission

Lamborghini
110% Profit After 1 Day Try Now
$1000 – $30000
Fast Earning Plan
Instant Withdrawals
Principal Return
15% Commission

TECHNICAL DETAILS

QUOTE

Script: GoldCoders LICENSED
Hosting: Cloudflare (216 paying HYIPs)
IP-address: 172.67.223.164 (United States / Chicago)
IP not used in other projects
NS servers: gwen.ns.cloudflare.com, lynn.ns.cloudflare.com
SSL: Cloudflare Inc ECC CA-3 valid from 30 Nov, 2020 to 30 Nov, 2021 – Cloudflare, Inc.

Join HourMillion Limited

My deposit:

QUOTE

The amount of 70 USD has been withdrawn from your account. Accounts: U*->U5752705. Memo: Shopping Cart Payment. Deposit to HourMillion.com-Cashout Your Hourly Profit Instant User List4Hyip_com.. Date: 07:13 23.02.21. Batch: 371039355.

Hourmillion Limited – Hourmillion.com

Start 2021-01-16. PerfectMoney Verified, 0 Trust Score point(s) (Malaysia IPB Image), Bitcoin, Ethereum, Litecoin, ePayCore, Visa-Mastercard, BankTransfer

Languages: EN

IPB Image

Description:

QUOTE

HourMillion As a cryptocurrency investment management company with over eight years experience and a highly qualified staff and our UK COMPANY #13080507.our server is Dedicated Server and DDoS Protection its always keep our investors data in safe.we have the knowledge and expertise to help you grow any cryptocurrency investment. Our professionalism and pursuit of perfection have helped us grow and earn $100 million between 2013 and 2020, and our profits are only growing. Let’s explore some of the benefits of using our service. Our professional staff is much more than just a crypto-currency investment company and is ready to help you at every stage of the investment process. minimal investment is $20, if you want to earn more so you have the opportunity to refer others and receive a commission on their investment, ranging from 3%~15%. Few other investment management companies offer such large referral commissions.

Investment plans:

1.17%~3% hourly for 90 hours
PLAN AMOUNT SPENT ($) HOURLY PROFIT (%)
Plan 1 $10.00 – $449.00 1.17
Plan 2 $450.00 – $4500.00 3.00

6% – 8% Hourly for 40 hours
PLAN AMOUNT SPENT ($) HOURLY PROFIT (%)
Plan 1 $450.00 – $4499.00 6.00
Plan 2 $4500.00 – $45000.00 8.00

15% – 18% Hourly for 20 hours
PLAN AMOUNT SPENT ($) HOURLY PROFIT (%)
Plan 1 $4500.00 – $4999.00 15.00
Plan 2 $5000.00 – $450000.00 18.00

110% Profit After 1 Day
PLAN AMOUNT SPENT ($) PROFIT (%)
Plan 1 $1000.00 – $30000.00 110.00

Our deposit:

23.02.21 06:48 Transfer Sent Payment: 150.00 USD to account U5752705 from U1294xxx. Batch: 371034652. Memo: Shopping Cart Payment. Deposit to hourmillion.com-Cashout Your Hourly Profit Instant User allhyips.

Details:

Minimal deposit: $10
Maximal deposit: $450000
Referral comission: 3%~15%
Payments: Instant
Features: SSL,DDOS

Whois:

Registrar ENOM, INC. eNom, LLC

Dates 172 days old
Created on 2020-09-03
Expires on 2021-09-03
Updated on 2021-01-04

Name Servers
GWEN.NS.CLOUDFLARE.COM (has 17,662,499 domains)
LYNN.NS.CLOUDFLARE.COM (has 17,662,499 domains)

SIGN UP

Crypto Marshal Limited – Cryptomarshals.com

I am not Admin Of this Project!
Start Feb 23-2021

Investment plans:

Plan 1: EVALUATE
daily 1.5% for 365 days
Min Deposit: $ 10
Max Deposit: $ 100
PRINCIPAL BACK AFTER 365 DAYS

Plan 2: ACCUMMULATE
daily 2.0% for 365 days
Min Deposit: $ 101
Max Deposit: $ 1000
PRINCIPAL BACK AFTER 365 DAYS

Plan 3: ENHANCE
daily 2.5% for 365 days
Min Deposit: $ 1001
Max Deposit: $ 5000
PRINCIPAL BACK AFTER 365 DAYS

Plan 4: ACCELERATE
daily 3.0% for 365 days
Min Deposit: $ 5001
Max Deposit: $ 10000
PRINCIPAL BACK AFTER 365 DAYS

Plan 5: MAXIMISE
daily 3.5% for 365 days
Min Deposit: $ 10001
Max Deposit: $ 25000
PRINCIPAL BACK AFTER 365 DAYS

Plan 6: MULTIPLY
daily 4.0% for 365 days
Min Deposit: $ 25001
Max Deposit: $ 99999
PRINCIPAL BACK AFTER 365 DAYS

Plan 7: BUSINESS CLUB EXTREME ROYAL
daily 5.0% for 365 days
Min Deposit: $ 100000
Max Deposit: $ 1000000
PRINCIPAL BACK AFTER 365 DAYS

BUSINESS CLUB EXTRA BENEFIT:

15.0% OF COMPANY PROFIT will be Shared among all the Business Club Members Every Month

Affiliate Program:

1st Level Instant Referral comission: 7%
2nd Level Instant Referral comission: 3%

Accept:
Perfect Money, Bitcoin, Ethereum, Bitcoin Cash.

Minimum withdraw amounts are: 2 USD or 0.00012 BTC
Perfect Money®
U27406788 (Crypto Marshals)

Features:
DDOS Protection
SSL
Licensed Goldcoders script
Live Support

Enzexbtc Limited – Enzexbtc.com

I am NOT the Admin or Owner of this program!
Start: Feb 22nd, 2021

EnzexBTC.com

QUOTE

Welcome to EnzexBTC Limited

EnzexBTC is offering beneficial partnership for everybody. We present a high-tech and modern company that is considered to be the industry leader in the area of computer technology, software and innovations. The specialists of our company are engaged in the process of the development of new ways and effective algorithms of token mining. In a few years a number of big mining farms have been built by our company in the UK. They are equipped with high-capacity and cutting-edge mining hardware that shows outstanding results being a good source of income.

Investment plans

QUOTE

Enzex D
1.15% Hourly
Min: 10.00$
Max: 500.00$
Hours: 90
Instant withdrawal

Enzex F
2.50% Hourly
Min: 500.00$
Max: 5000.00$
Hours: 48
Instant withdrawal

Enzex G
4.75% Hourly
Min: 2000.00$
Max: 20000.00$
Hours: 24
Instant withdrawal

TECHNICAL DETAILS

QUOTE

Script: undefined
Hosting: DDOS-Guard (81 paying HYIPs)
IP-address: 190.115.21.58 (Belize / Belize City)
IP used in 4 projects / 1 payings
NS servers: ns1.ddos-guard.net, ns2.ddos-guard.net, ns3.ddos-guard.net, ns4.ddos-guard.net, ns5.ddos-guard.net, ns6.ddos-guard.net
SSL: Free SSL valid from 22 Feb, 2021 to 23 May, 2021 – Let’s Encrypt

Join EnzexBTC

My Deposit:

QUOTE

The amount of 70 USD has been withdrawn from your account. Accounts: U*->U28003290. Memo: Shopping Cart Payment. Deposit to enzexbtc.com User List4Hyip_com.. Date: 22:36 22.02.21. Batch: 370990882.

entities – Limited editing of just the order of entity reference field

I would like to give some users the opportunity to edit the ORDER of a field of entity references holding multiple references– but not the references themselves.

One option would be to post process the field and turn off the editability of the form element. But this seems like to create the form element and then disable it.

Is there a better way?

javascript – Calling a paginated and rate limited REST API with a cursor value to get multiple pages of results using .fetch

I’m working with a paginated REST API that returns data from a GET request with the following structure:

{
  "data": (
           { "id": "26007494656", "user_id": "23161357"}, 
           { "id": "26007492556", "user_id": "23124357"}...
          ),
  "pagination": {
        "cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ=="
    }
}

The endpoints can return a maximum of 100 elements inside a data array per call, and are rate limited to 800 calls per minute. However, there can be at anytime 100,000 – 200,000 available data elements to retrieve. Furthermore, the pagination cursor value is needed for subsequent requests to mark the starting point for the next set of results, and this value is updated on every successive request.

While it won’t likely be possible to retrieve all the data available from this endpoint, I have approached this problem using recursion:

function getAllData (cursor, data = (), counter = 35) {
  while (counter !== 0) {
    const request = new Request(url + (cursor ? '&after=' + cursor : ''), { 
    method: 'GET' ,
    headers: {
      'Client-ID': clientId,
      'Authorization': `Bearer ${access_token}`,
      'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8'
      }
    });
      return fetch(request).then((response) => response.json()).then((responseJson) => { 
        if (counter === 1) return data;
        data.push(...responseJson.data);
        return getAllData(responseJson.pagination.cursor, data, --counter);
    }).catch(showError);
  }
}

I’m wondering if there is a better way to approach working with this API with the goal of retrieving as much data as reasonably possible, or if this function can be optimized somehow. The counter argument specifies the number of times the recursive call should be made, and the catch block simply displays an error message to the user. I’m using the maximum return value of 100 objects per call so it currently returns an array of approximately 3500 data elements.

With the way this function is being utilized in my app, it could be called as many as 4-5 times in a minute, and it seems to take approximately 6-7 seconds for the function to finish its recursive calls and return data. Currently, I’m using this function in a client-side Javascript file, but I’m thinking about maybe moving some of this logic to an Express server.

Mega Crypto Group Limited – Megacrypto.io

I’m not admin.

Features: SSL encryption | Licensed GC script | Dedicated server/IP | Registered company | Paying 7 days a week

About:

QUOTE

Welcome to Megacrypto. We are a main organization that emphasis on Forex market and Cryptographic money parts. We will probably accomplish the most astounding profit from the movement for the outside cash trade (Forex) and Digital money trade markets. On the off chance that you might want to enter the universe of online Forex exchanging and Digital currency exchanging with present day Cloud Mining stage then you are on your correct way. Ventures with Megacrypto are moderate and safe.

Megacrypto has been doing business since 2015 and accomplished brilliant outcomes. The experience and aptitudes of our brokers and budgetary specialists is the way to the achievement of the speculation finance. All through our professions, every one of us has drilled venture administration at the most abnormal amounts and constructed a strong notoriety for fabulous aptitudes and considerable experience. Our exceptionally energetic representatives and experienced specialists from the zone of back and related fields including exchanging, examination, showcasing, PC innovation, law and administration are prepared to give proficient administrations.

Investment Plans:

QUOTE

130% After 1 Day
Min: $10 | Max: $75000

430% After 5 Days
Min: $100 | Max: $75000

900% After 10 Days
Min: $100 | Max: $75000

1500% After 15 Days
Min: $100 | Max: $75000

2200% After 30 Days
Min: $500 | Max: $75000

5000% After 60 Days
Min: $1000 | Max: $75000

9000% After 90 Days
Min: $1000 | Max: $75000

Referral: Up To 10%
Withdrawal: Manual

Payment systems: Perfect Money, Payeer, Bitcoin, Litecoin, Dogecoin, Ethereum, Bitcoin Cash, Dash

Visit megacrypto.io and Sign Up

Deposit:

The amount of 50 USD has been withdrawn from your account. Accounts: U1136717->U24975927. Memo: Shopping Cart Payment. Deposit to Mega Crypto Limited User hyipsinfo.. Date: 14:33 09.02.21. Batch: 367738507.

Power Earn Limited – Powerearn.biz

Start 2021-02-04. PerfectMoney Not verified, 0 Trust Score point(s) (United Kingdom IPB Image), Bitcoin, Ethereum, Litecoin

Languages: EN

IPB Image

Description:

QUOTE

When it comes to reliable, powerful, innovative batteries and accumulators for companies and private users, there is no better choice than advanced engineering and manufacturing solutions from the company Power Earn Limited. Our goal is to secure the power supply chain all times, in the most reliable way, and to make it simple for our customers. We strive to the deliver outstanding service, innovative products and customizable, robust and reliable solutions that meet the demands of today’s energy provision and to prepare for tomorrows challenges. With products ranging from simple batteries to huge multi-megawatt grid-connected energy systems operating in tough environments like remote mountainous or desert regions, coastal areas, or critical datacenter applications, our products have been put to the test in commercial revenue service, and are unmatched in performance and safety.

Investment plans:

7-10% daily forever

Our deposit:

04.02.21 08:02 Transfer Sent Payment: 150.00 USD to account U28708510 from U1294xxx. Batch: 366509338. Memo: Shopping Cart Payment. Create deposit all-hyips.info.

Details:

Minimal deposit: $10
Maximal deposit: $500000
Referral comission: 8% – 2%
Payments: Instant
Features: SSL,DDOS,Original script

Whois:

Updated Date: 2021-02-03T13:14:57Z
Creation Date: 2021-01-29T13:14:52Z
Registry Expiry Date: 2022-01-29T13:14:52Z
Registrar: NameCheap, Inc.

Name Server: ns5.ddos-guard.net
Name Server: ns2.ddos-guard.net
Name Server: ns4.ddos-guard.net
Name Server: ns3.ddos-guard.net
Name Server: ns1.ddos-guard.net

SIGN UP